GNU bug report logs - #36861
27.0.50; display-fill-column-indicator-mode in log-edit-mode

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 30 Jul 2019 20:47:02 UTC

Severity: wishlist

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36861 <at> debbugs.gnu.org
Subject: bug#36861: 27.0.50; display-fill-column-indicator-mode in log-edit-mode
Date: Wed, 31 Jul 2019 23:49:53 +0300
[Message part 1 (text/plain, inline)]
>>   (log-edit-mode . ((log-edit-font-lock-gnu-style . t)
>> -                   (log-edit-setup-add-author . t)))
>> +                   (log-edit-setup-add-author . t)
>> +                   (display-fill-column-indicator-column . 78)
>> +                   (eval . (display-fill-column-indicator-mode))))
>
> This will cause an annoying message and prompt when editing Emacs
> sources with an Emacs which doesn't yet have
> display-fill-column-indicator-mode, right?  Can we avoid that?  I
> routinely need to work on the latest sources with an older Emacs.

Shouldn't local-variables functions ignore undefined variables and commands?
Probably not, since such change won't help for older versions.

Then one way is to put such lines to the init file
to avoid typing `y' to confirm local variables
while using emacs-26 to commit emacs-27 changes:

  (put 'display-fill-column-indicator 'safe-local-variable 'booleanp)
  (put 'display-fill-column-indicator-character 'safe-local-variable 'characterp)
  (put 'display-fill-column-indicator-column 'safe-local-variable
       (lambda (value) (or (booleanp value) (integerp value))))
  (defun display-fill-column-indicator-mode ())

And for emacs-27 and future versions this patch is required as well:
[display-fill-column-indicator-cus-start.patch (text/x-diff, inline)]
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index e1d0bce2ad..036674ef14 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -650,7 +650,7 @@ minibuffer-prompt-properties--setter
                                  "26.1")
 
              (display-fill-column-indicator display-fill-column-indicator
-                                 boolean "27.1")
+                                 boolean "27.1" :safe booleanp)
              (display-fill-column-indicator-column display-fill-column-indicator
                                  (choice
                                   (const :tag "Use fill-column variable"
@@ -659,9 +659,9 @@ minibuffer-prompt-properties--setter
                                          :value 70
                                          :format "%v")
                                   integer)
-                                 "27.1")
+                                 "27.1" :safe (lambda (value) (or (booleanp value) (integerp value))))
              (display-fill-column-indicator-character display-fill-column-indicator
-                                 character "27.1")
+                                 character "27.1" :safe characterp)
 	     ;; xfaces.c
 	     (scalable-fonts-allowed display boolean "22.1")
 	     ;; xfns.c

This bug report was last modified 4 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.