From 28d0654943ca4e66cdcb498c53dc8aaa41fe2fad Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 26 Mar 2021 11:28:03 -0400 Subject: [PATCH] * lisp/mh-e/: Take advice-remove of the newly enabled lexical-binding * lisp/mh-e/mh-mime.el (mh-mm-inline-message): * lisp/mh-e/mh-inc.el (mh-inc-spool-generator): Replace `(lambda...) with a proper closure. --- lisp/mh-e/mh-inc.el | 14 +++++--------- lisp/mh-e/mh-mime.el | 8 +++++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el index 90d54895261..6a29195afbb 100644 --- a/lisp/mh-e/mh-inc.el +++ b/lisp/mh-e/mh-inc.el @@ -62,15 +62,11 @@ (defun mh-inc-spool-generator (folder spool) "Create a command to inc into FOLDER from SPOOL file." - (let ((folder1 (make-symbol "folder")) - (spool1 (make-symbol "spool"))) - (set folder1 folder) - (set spool1 spool) - (setf (symbol-function (intern (concat "mh-inc-spool-" folder))) - `(lambda () - ,(format "Inc spool file %s into folder %s." spool folder) - (interactive) - (mh-inc-folder ,spool1 (concat "+" ,folder1)))))) + (defalias (symbol-function (intern (concat "mh-inc-spool-" folder))) + (lambda () + (:documentation (format "Inc spool file %s into folder %s." spool folder)) + (interactive) + (mh-inc-folder spool (concat "+" folder))))) (defun mh-inc-spool-def-key (key folder) "Define a KEY in `mh-inc-spool-map' to inc FOLDER and collect help string." diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 3ae8b0728cc..5ffba8fe1a8 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -487,9 +487,11 @@ decoding the same message multiple times." (mh-display-emphasis) (mm-handle-set-undisplayer handle - `(lambda () - (let (buffer-read-only) - (delete-region ,(point-min-marker) ,(point-max-marker))))))))) + (let ((beg (point-min-marker)) + (end (point-max-marker))) + (lambda () + (let ((inhibit-read-only t)) + (delete-region beg end))))))))) ;;;###mh-autoload (defun mh-decode-message-header () -- 2.39.2