From d4b6c2e3326c888da19e2be60899a27ef8a16f0a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:16:44 +0000 Subject: [PATCH] (lm-with-file): Use Lisp mode in temp buffer. In non-temp buffer, switch syntax table temporarily. --- lisp/ChangeLog | 27 +++++++++++++++++++++++++++ lisp/emacs-lisp/lisp-mnt.el | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab130e2c09b..1def811c5c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,30 @@ +2005-01-15 Richard M. Stallman + + * emacs-lisp/lisp-mnt.el (lm-with-file): Use Lisp mode in temp buffer. + In non-temp buffer, switch syntax table temporarily. + + * emacs-lisp/lisp-mode.el (indent-pp-sexp): Doc fix. + + * replace.el (occur-accumulate-lines, occur-engine): Avoid warnings. + + * tar-mode.el (tar-extract): Bind buffer-undo-list to t. + + * imenu.el (imenu--split-menu): Copy menulist before sorting. + (imenu--generic-function): Use START, not BEG, as pos of definition. + + * simple.el (just-one-space): Argument specifies number of spaces. + + * simple.el (eval-expression-print-format): Avoid warning + about edebug-active. + +2005-01-15 "James R. Van Zandt" (Tiny change) + + * progmodes/sh-script.el: Code copied from make-mode.el + with small changes, + (sh-mode-map): Bind C-c C-\. + (sh-backslash-column, sh-backslash-align): New variables. + (sh-backslash-region, sh-append-backslash): New functions. + 2005-01-15 Sergey Poznyakoff * mail/rmail.el: Updated to work with movemail from GNU Mailutils diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 671f3c8ce2a..701da1c4dec 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -304,9 +304,14 @@ If FILE is nil, execute BODY in the current buffer." (if ,filesym (with-temp-buffer (insert-file-contents ,filesym) + (lisp-mode) ,@body) (save-excursion - ,@body))))) + ;; Switching major modes is too drastic, so just switch + ;; temporarily to the Lisp mode syntax table. + (with-syntax-table lisp-mode-syntax-table + ,@body)))))) + (put 'lm-with-file 'lisp-indent-function 1) (put 'lm-with-file 'edebug-form-spec t) -- 2.39.2