Explorar o código

Undid one of the scatter-related changes

John Wiegley %!s(int64=14) %!d(string=hai) anos
pai
achega
c61cdced2f
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      lisp/org-agenda.el

+ 7 - 1
lisp/org-agenda.el

@@ -7887,7 +7887,13 @@ The prefix arg is passed through to the command if possible."
 	     (c1 (if (eq action ?s) 'org-agenda-schedule 'org-agenda-deadline)))
 	(setq cmd `(let* ((bound (fboundp 'read-string))
 			  (old (and bound (symbol-function 'read-string))))
-		     (eval '(,c1 arg nil ,date))))))
+		     (unwind-protect
+			 (progn
+			   (fset 'read-string (lambda (&rest ignore) ,ans))
+			   (eval '(,c1 arg)))
+		       (if bound
+			   (fset 'read-string old)
+			 (fmakunbound 'read-string)))))))
 
      ((eq action '?S)
       (let ((days (read-number