bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#8613: "mode:" for minor-mode breaks set-visited-file-name


From: Glenn Morris
Subject: bug#8613: "mode:" for minor-mode breaks set-visited-file-name
Date: Mon, 09 May 2011 19:41:16 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Do you have a preference for a solution?
Here's the hack-one-local-variable-eval-safep version:

*** lisp/files.el       2011-04-24 00:24:30 +0000
--- lisp/files.el       2011-05-09 23:22:07 +0000
***************
*** 3327,3332 ****
--- 3327,3336 ----
        ;; Certain functions can be allowed with safe arguments
        ;; or can specify verification functions to try.
        (and (symbolp (car exp))
+          ;; Allow (minor)-modes calls with no arguments.
+          ;; This obsoletes the use of "mode:" for such things.  (Bug#8613)
+          (or (and (null (cdr exp))
+                   (string-match "-mode\\'" (symbol-name (car exp))))
               (let ((prop (get (car exp) 'safe-local-eval-function)))
                 (cond ((eq prop t)
                        (let ((ok t))
***************
*** 3341,3347 ****
                      (dolist (function prop)
                        (if (funcall function exp)
                            (setq ok t)))
!                     ok)))))))
  
  (defun hack-one-local-variable (var val)
    "Set local variable VAR with value VAL.
--- 3345,3351 ----
                          (dolist (function prop)
                            (if (funcall function exp)
                                (setq ok t)))
!                         ok))))))))
  
  (defun hack-one-local-variable (var val)
    "Set local variable VAR with value VAL.





reply via email to

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