emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lambda in macrolet becomes a closure? (another breaking change in em


From: Constantin Kulikov
Subject: Re: Lambda in macrolet becomes a closure? (another breaking change in emacs:))
Date: Tue, 27 Sep 2016 14:53:18 +0300

Also, by looking at `minibuffer-with-setup-hook':

(defmacro minibuffer-with-setup-hook (fun &rest body)
  (declare (indent 1) (debug t))
  (let ((hook (make-symbol "setup-hook"))
        (funsym (make-symbol "fun"))
        (append nil))
    (when (eq (car-safe fun) :append)
      (setq append '(t) fun (cadr fun)))
    `(let ((,funsym ,fun)
           ,hook)
       (setq ,hook
             (lambda ()
               ;; Clear out this hook so it does not interfere
               ;; with any recursive minibuffer usage.
               (remove-hook 'minibuffer-setup-hook ,hook)
               (funcall ,funsym)))
       (unwind-protect
           (progn
             (add-hook 'minibuffer-setup-hook ,hook ,@append)
             ,@body)
         (remove-hook 'minibuffer-setup-hook ,hook)))))

There is no quotation of the fun, funsym or hook. Is it correct?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]