diff lisp/emacs-lisp/lisp-mnt.el @ 59572:3cd31d377b69

(lm-with-file): Use Lisp mode in temp buffer. In non-temp buffer, switch syntax table temporarily.
author Richard M. Stallman <rms@gnu.org>
date Sat, 15 Jan 2005 18:15:46 +0000
parents 7a30ab50eb0b
children a7e02ef1e3d6 cb67264d6096
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mnt.el	Sat Jan 15 18:11:33 2005 +0000
+++ b/lisp/emacs-lisp/lisp-mnt.el	Sat Jan 15 18:15:46 2005 +0000
@@ -304,9 +304,14 @@
        (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)