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

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

bug#14710: add-file-local-variable vs. unquoted string


From: Juri Linkov
Subject: bug#14710: add-file-local-variable vs. unquoted string
Date: Tue, 25 Jun 2013 09:10:00 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

>> displayed, you won't see it anyway because it will be instantaneously
>> overwritten in the echo area by another recently added message:
>> "For this change to take effect revisit file using `revert-buffer'".
>
> Could use display-warning.

display-warning pops up a new window, and this changes the
window configuration that might be undesirable for users.
I wonder why display-warning doesn't support the warning display
in the echo area?  I see no problem with displaying multi-line
messages in the echo area.

But anyway for the given report it seems too late to display
the warning after a wrong value is inserted to the buffer.

I suggest to display the warning before entering a string value
by changing the prompt from

  Add compile-command with value: a b c

to

  Add compile-command with value (use quotes for strings): "a b c"

=== modified file 'lisp/files-x.el'
--- lisp/files-x.el     2013-06-19 22:39:41 +0000
+++ lisp/files-x.el     2013-06-25 06:09:04 +0000
@@ -88,7 +88,8 @@ (defun read-file-local-variable-value (v
         (format "Add %s with value: " variable))
        default))
      (t
-      (read (read-string (format "Add %s with value: " variable)
+      (read (read-string (format "Add %s with value (use quotes for strings): "
+                                variable)
                         nil 'set-variable-value-history
                         (format "%S"
                                 (cond ((eq variable 'unibyte) t)






reply via email to

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