unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 36861@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	[thread overview]
Message-ID: <871ry6rksu.fsf@mail.linkov.net> (raw)
In-Reply-To: <83mugvhr66.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 31 Jul 2019 05:30:09 +0300")

[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]

>>   (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:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: display-fill-column-indicator-cus-start.patch --]
[-- Type: text/x-diff, Size: 1276 bytes --]

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

  reply	other threads:[~2019-07-31 20:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 20:44 bug#36861: 27.0.50; display-fill-column-indicator-mode in log-edit-mode Juri Linkov
2019-07-30 21:21 ` Juri Linkov
2019-07-31  2:30 ` Eli Zaretskii
2019-07-31 20:49   ` Juri Linkov [this message]
2019-08-02  9:10     ` Eli Zaretskii
2019-08-03 22:31       ` Juri Linkov
2019-08-04  0:51         ` Ergus
2019-08-04 19:39           ` Juri Linkov
2019-08-04 20:30             ` Ergus
2019-08-06 14:59               ` Eli Zaretskii
2019-08-06 17:51                 ` Ergus
2019-08-06 18:26                   ` Eli Zaretskii
2019-08-06 19:25                     ` Ergus
2019-08-07 14:42                       ` Eli Zaretskii
2020-08-09 19:18                         ` Lars Ingebrigtsen
2019-08-05 21:43       ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871ry6rksu.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=36861@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).