aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emulation
diff options
context:
space:
mode:
authorPaul Eggert2015-08-23 22:38:02 -0700
committerPaul Eggert2015-08-23 22:39:06 -0700
commitfbb5531fa11d13854b274d28ccd329c9b6652cfc (patch)
tree12dae03400f11dceb50e251c8ca59d2765522adb /lisp/emulation
parenta5fd059f726f4de839d33a2813f1c98d62fc6fbe (diff)
downloademacs-fbb5531fa11d13854b274d28ccd329c9b6652cfc.tar.gz
emacs-fbb5531fa11d13854b274d28ccd329c9b6652cfc.zip
More-conservative ‘format’ quote restyling
Instead of restyling curved quotes for every call to ‘format’, create a new function ‘format-message’ that does the restyling, and using the new function instead of ‘format’ only in contexts where this seems appropriate. Problem reported by Dmitry Gutov and Andreas Schwab in: http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00826.html http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00827.html * doc/lispref/commands.texi (Using Interactive): * doc/lispref/control.texi (Signaling Errors, Signaling Errors): * doc/lispref/display.texi (Displaying Messages, Progress): * doc/lispref/elisp.texi: * doc/lispref/help.texi (Keys in Documentation): * doc/lispref/minibuf.texi (Minibuffer Misc): * doc/lispref/strings.texi (Formatting Strings): * etc/NEWS: Document the changes. * lisp/abbrev.el (expand-region-abbrevs): * lisp/apropos.el (apropos-library): * lisp/calc/calc-ext.el (calc-record-message) (calc-user-function-list): * lisp/calc/calc-help.el (calc-describe-key, calc-full-help): * lisp/calc/calc-lang.el (math-read-big-balance): * lisp/calc/calc-store.el (calc-edit-variable): * lisp/calc/calc-units.el (math-build-units-table-buffer): * lisp/calc/calc-yank.el (calc-edit-mode): * lisp/calendar/icalendar.el (icalendar-export-region) (icalendar--add-diary-entry): * lisp/cedet/mode-local.el (mode-local-print-binding) (mode-local-describe-bindings-2): * lisp/cedet/semantic/complete.el (semantic-completion-message): * lisp/cedet/semantic/edit.el (semantic-parse-changes-failed): * lisp/cedet/semantic/wisent/comp.el (wisent-log): * lisp/cedet/srecode/insert.el (srecode-insert-show-error-report): * lisp/descr-text.el (describe-text-properties-1, describe-char): * lisp/dframe.el (dframe-message): * lisp/dired-aux.el (dired-query): * lisp/emacs-lisp/byte-opt.el (byte-compile-log-lap-1): * lisp/emacs-lisp/bytecomp.el (byte-compile-log) (byte-compile-log-file, byte-compile-warn, byte-compile-form): * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use) (cconv-analyze-form): * lisp/emacs-lisp/check-declare.el (check-declare-warn): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet): * lisp/emacs-lisp/edebug.el (edebug-format): * lisp/emacs-lisp/eieio-core.el (eieio-oref): * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message) (eldoc-message): * lisp/emacs-lisp/elint.el (elint-file, elint-log): * lisp/emacs-lisp/find-func.el (find-function-library): * lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/nadvice.el (advice--make-docstring): * lisp/emacs-lisp/package.el (package-compute-transaction) (package-install-button-action, package-delete-button-action) (package-menu--list-to-prompt): * lisp/emacs-lisp/timer.el (timer-event-handler): * lisp/emacs-lisp/warnings.el (lwarn, warn): * lisp/emulation/viper-cmd.el: (viper-toggle-parse-sexp-ignore-comments) (viper-kill-buffer, viper-brac-function): * lisp/emulation/viper-macs.el (viper-record-kbd-macro): * lisp/facemenu.el (facemenu-add-new-face): * lisp/faces.el (face-documentation, read-face-name) (face-read-string, read-face-font, describe-face): * lisp/files.el (find-alternate-file, hack-local-variables) (hack-one-local-variable--obsolete, write-file) (basic-save-buffer, delete-directory): * lisp/format.el (format-write-file, format-find-file) (format-insert-file): * lisp/help-fns.el (help-fns--key-bindings) (help-fns--compiler-macro, help-fns--obsolete) (help-fns--interactive-only, describe-function-1) (describe-variable): * lisp/help.el (describe-mode): * lisp/info-xref.el (info-xref-output): * lisp/info.el (Info-virtual-index-find-node) (Info-virtual-index, info-apropos): * lisp/international/kkc.el (kkc-error): * lisp/international/mule-cmds.el: (select-safe-coding-system-interactively) (select-safe-coding-system, describe-input-method): * lisp/international/mule-conf.el (code-offset): * lisp/international/mule-diag.el (describe-character-set) (list-input-methods-1): * lisp/international/quail.el (quail-error): * lisp/minibuffer.el (minibuffer-message): * lisp/mpc.el (mpc--debug): * lisp/msb.el (msb--choose-menu): * lisp/net/ange-ftp.el (ange-ftp-message): * lisp/net/gnutls.el (gnutls-message-maybe): * lisp/net/newst-backend.el (newsticker--sentinel-work): * lisp/net/newst-treeview.el (newsticker--treeview-load): * lisp/net/nsm.el (nsm-query-user): * lisp/net/rlogin.el (rlogin): * lisp/net/soap-client.el (soap-warning): * lisp/net/tramp.el (tramp-debug-message): * lisp/nxml/nxml-outln.el (nxml-report-outline-error): * lisp/nxml/nxml-parse.el (nxml-parse-error): * lisp/nxml/rng-cmpct.el (rng-c-error): * lisp/nxml/rng-match.el (rng-compile-error): * lisp/nxml/rng-uri.el (rng-uri-error): * lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer): * lisp/org/org-ctags.el: (org-ctags-ask-rebuild-tags-file-then-find-tag): * lisp/proced.el (proced-log): * lisp/progmodes/ebnf2ps.el (ebnf-log): * lisp/progmodes/flymake.el (flymake-log): * lisp/progmodes/vhdl-mode.el (vhdl-warning-when-idle): * lisp/replace.el (occur-1): * lisp/simple.el (execute-extended-command) (undo-outer-limit-truncate, define-alternatives): * lisp/startup.el (command-line): * lisp/subr.el (error, user-error, add-to-list): * lisp/tutorial.el (tutorial--describe-nonstandard-key) (tutorial--find-changed-keys): * src/callint.c (Fcall_interactively): * src/editfns.c (Fmessage, Fmessage_box): Restyle the quotes of format strings intended for use as a diagnostic, when restyling seems appropriate. * lisp/subr.el (format-message): New function. * src/doc.c (Finternal__text_restyle): New function. (syms_of_doc): Define it.
Diffstat (limited to 'lisp/emulation')
-rw-r--r--lisp/emulation/viper-cmd.el12
-rw-r--r--lisp/emulation/viper-macs.el16
2 files changed, 14 insertions, 14 deletions
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 40a37c7d8b6..14f424e9344 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -3447,8 +3447,8 @@ controlled by the sign of prefix numeric value."
3447 (interactive) 3447 (interactive)
3448 (setq viper-parse-sexp-ignore-comments 3448 (setq viper-parse-sexp-ignore-comments
3449 (not viper-parse-sexp-ignore-comments)) 3449 (not viper-parse-sexp-ignore-comments))
3450 (princ (format 3450 (princ (format-message
3451 "From now on, `%%' will %signore parentheses inside comment fields" 3451 "From now on, %% will %signore parentheses inside comment fields"
3452 (if viper-parse-sexp-ignore-comments "" "NOT ")))) 3452 (if viper-parse-sexp-ignore-comments "" "NOT "))))
3453 3453
3454 3454
@@ -3986,8 +3986,8 @@ Null string will repeat previous search."
3986 (if (null buffer) (error "`%s': No such buffer" buffer-name)) 3986 (if (null buffer) (error "`%s': No such buffer" buffer-name))
3987 (if (or (not (buffer-modified-p buffer)) 3987 (if (or (not (buffer-modified-p buffer))
3988 (y-or-n-p 3988 (y-or-n-p
3989 (format 3989 (format-message
3990 "Buffer `%s' is modified, are you sure you want to kill it? " 3990 "Buffer %s is modified, are you sure you want to kill it? "
3991 buffer-name))) 3991 buffer-name)))
3992 (kill-buffer buffer) 3992 (kill-buffer buffer)
3993 (error "Buffer not killed")))) 3993 (error "Buffer not killed"))))
@@ -4636,8 +4636,8 @@ One can use \\=`\\=` and '' to temporarily jump 1 step back."
4636 (substring text 0 (- pos s)) 4636 (substring text 0 (- pos s))
4637 reg (substring text (- pos s))))) 4637 reg (substring text (- pos s)))))
4638 (princ 4638 (princ
4639 (format 4639 (format-message
4640 "Textmarker `%c' is in buffer `%s' at line %d.\n" 4640 "Textmarker %c is in buffer %s at line %d.\n"
4641 reg (buffer-name buf) line-no)) 4641 reg (buffer-name buf) line-no))
4642 (princ (format "Here is some text around %c:\n\n %s" 4642 (princ (format "Here is some text around %c:\n\n %s"
4643 reg text))) 4643 reg text)))
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el
index 89bc77f9799..e8568328b7a 100644
--- a/lisp/emulation/viper-macs.el
+++ b/lisp/emulation/viper-macs.el
@@ -369,12 +369,12 @@ If SCOPE is nil, the user is asked to specify the scope."
369 (setq scope 369 (setq scope
370 (cond 370 (cond
371 ((y-or-n-p 371 ((y-or-n-p
372 (format 372 (format-message
373 "Map this macro for buffer `%s' only? " 373 "Map this macro for buffer %s only? "
374 (buffer-name))) 374 (buffer-name)))
375 (setq msg 375 (setq msg
376 (format 376 (format-message
377 "%S is mapped to %s for %s in `%s'" 377 "%S is mapped to %s for %s in %s"
378 (viper-display-macro macro-name) 378 (viper-display-macro macro-name)
379 (viper-abbreviate-string 379 (viper-abbreviate-string
380 (format 380 (format
@@ -385,12 +385,12 @@ If SCOPE is nil, the user is asked to specify the scope."
385 state-name (buffer-name))) 385 state-name (buffer-name)))
386 (buffer-name)) 386 (buffer-name))
387 ((y-or-n-p 387 ((y-or-n-p
388 (format 388 (format-message
389 "Map this macro for the major mode `%S' only? " 389 "Map this macro for the major mode %S only? "
390 major-mode)) 390 major-mode))
391 (setq msg 391 (setq msg
392 (format 392 (format-message
393 "%S is mapped to %s for %s in `%S'" 393 "%S is mapped to %s for %s in %S"
394 (viper-display-macro macro-name) 394 (viper-display-macro macro-name)
395 (viper-abbreviate-string 395 (viper-abbreviate-string
396 (format 396 (format