From 74ab01ffd8382d9112aa364b489b6fb84248f68b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 2 Apr 2009 01:56:43 +0000 Subject: [PATCH] (auto-fill-function): Mark it as safe for nil. Suggested by Leo Liu . --- lisp/ChangeLog | 15 +++++++++------ lisp/simple.el | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2c1aa57c6c2..7297dac77ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,18 +1,21 @@ +2009-04-02 Stefan Monnier + + * simple.el (auto-fill-function): Mark it as safe for nil. + Suggested by Leo . + 2009-04-01 Dan Nicolaescu * vc-mtn.el (vc-mtn-register): Fix optional arguments. * vc-hooks.el (vc-name): Avoid calling vc-backend twice. - (vc-mode-line): Accept and use an optional argument for the - backend. + (vc-mode-line): Accept and use an optional argument for the backend. (vc-find-file-hook): Use when instead of if. Avoid calling - vc-backend multiple times, pass down the value computed the first - time. + vc-backend multiple times, pass down the value computed the first time. 2009-03-30 Andreas Schwab - * ansi-color.el (ansi-color-get-face): Use - ansi-color-parameter-regexp to match parameters. + * ansi-color.el (ansi-color-get-face): + Use ansi-color-parameter-regexp to match parameters. (ansi-color-regexp): Include final `m' in first group. 2009-03-30 Jason Rumney diff --git a/lisp/simple.el b/lisp/simple.el index b7f1fca0f37..d6245a3b76b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5008,6 +5008,10 @@ unless optional argument SOFT is non-nil." Some major modes set this.") (put 'auto-fill-function :minor-mode-function 'auto-fill-mode) +;; `functions' and `hooks' are usually unsafe to set, but setting +;; auto-fill-function to nil in a file-local setting is safe and +;; can be useful to prevent auto-filling. +(put 'auto-fill-function 'safe-local-variable 'null) ;; FIXME: turn into a proper minor mode. ;; Add a global minor mode version of it. (defun auto-fill-mode (&optional arg) -- 2.39.5