summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-08-23 22:38:02 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-08-23 22:39:06 -0700
commitfbb5531fa11d13854b274d28ccd329c9b6652cfc (patch)
tree12dae03400f11dceb50e251c8ca59d2765522adb /lisp/net
parenta5fd059f726f4de839d33a2813f1c98d62fc6fbe (diff)
downloademacs-fbb5531fa11d13854b274d28ccd329c9b6652cfc.tar.gz
emacs-fbb5531fa11d13854b274d28ccd329c9b6652cfc.tar.bz2
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/net')
-rw-r--r--lisp/net/ange-ftp.el2
-rw-r--r--lisp/net/gnutls.el2
-rw-r--r--lisp/net/newst-backend.el6
-rw-r--r--lisp/net/newst-treeview.el8
-rw-r--r--lisp/net/nsm.el2
-rw-r--r--lisp/net/rlogin.el4
-rw-r--r--lisp/net/soap-client.el3
-rw-r--r--lisp/net/tramp.el10
8 files changed, 19 insertions, 18 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 0685bac26c7..62ee31657e1 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1107,7 +1107,7 @@ All HOST values should be in lower case.")
(defun ange-ftp-message (fmt &rest args)
"Display message in echo area, but indicate if truncated.
Args are as in `message': a format string, plus arguments to be formatted."
- (let ((msg (apply 'format fmt args))
+ (let ((msg (apply #'format-message fmt args))
(max (window-width (minibuffer-window))))
(if noninteractive
msg
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index 235b2a2a111..418796a89c9 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -259,7 +259,7 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT."
(message "%s: (err=[%s] %s) %s"
"gnutls.el"
doit (gnutls-error-string doit)
- (apply 'format format (or params '(nil))))))
+ (apply #'format-message format (or params '(nil))))))
(provide 'gnutls)
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 435851cc504..01755488a64 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -846,10 +846,10 @@ Argument BUFFER is the buffer of the retrieval process."
newsticker--cache
name-symbol
newsticker--error-headline
- (format
+ (format-message
(concat "%s: Newsticker could not retrieve news from %s.\n"
- "Return status: `%s'\n"
- "Command was `%s'")
+ "Return status: ‘%s’\n"
+ "Command was ‘%s’")
(format-time-string "%A, %H:%M")
feed-name event command)
""
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index eca2a9c3eca..ef8507e25ce 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -1268,8 +1268,8 @@ Note: does not update the layout."
(expand-file-name (concat newsticker-dir "/groups"))))
(file-exists-p newsticker-groups-filename)
(y-or-n-p
- (format
- (concat "Obsolete variable `newsticker-groups-filename' "
+ (format-message
+ (concat "Obsolete variable ‘newsticker-groups-filename’ "
"points to existing file \"%s\".\n"
"Read it? ")
newsticker-groups-filename))
@@ -1279,9 +1279,9 @@ Note: does not update the layout."
(find-file-noselect filename))))
(and newsticker-groups-filename
(file-exists-p newsticker-groups-filename)
- (y-or-n-p (format
+ (y-or-n-p (format-message
(concat "Delete the file \"%s\",\nto which the obsolete "
- "variable `newsticker-groups-filename' points ? ")
+ "variable ‘newsticker-groups-filename’ points ? ")
newsticker-groups-filename))
(delete-file newsticker-groups-filename))
(when buf
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 261e5a1a36c..c54553ae5ea 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -304,7 +304,7 @@ unencrypted."
(when (> (length cert) 0)
(insert cert "\n"))
(let ((start (point)))
- (insert (apply 'format message args))
+ (insert (apply #'format-message message args))
(goto-char start)
;; Fill the first line of the message, which usually
;; contains lots of explanatory text.
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index e71179b6b89..c0dcc2332fe 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -174,8 +174,8 @@ If you wish to change directory tracking styles during a session, use the
function `rlogin-directory-tracking-mode' rather than simply setting the
variable."
(interactive (list
- (read-from-minibuffer (format
- "Arguments for `%s' (hostname first): "
+ (read-from-minibuffer (format-message
+ "Arguments for ‘%s’ (hostname first): "
(file-name-nondirectory rlogin-program))
nil nil nil 'rlogin-history)
current-prefix-arg))
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 3fc60225c5a..a05108df0ae 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -51,7 +51,8 @@
(defsubst soap-warning (message &rest args)
"Display a warning MESSAGE with ARGS, using the 'soap-client warning type."
- (display-warning 'soap-client (apply 'format message args) :warning))
+ (display-warning 'soap-client (apply #'format-message message args)
+ :warning))
(defgroup soap-client nil
"Access SOAP web services from Emacs."
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 193d70b230a..69d7e1fe613 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1504,7 +1504,7 @@ ARGUMENTS to actually emit the message (if applicable)."
; (1+ (count-lines (point-min) (cdr ffn)))))))
(insert (format "%s " fn)))
;; The message.
- (insert (apply 'format fmt-string arguments))))
+ (insert (apply #'format-message fmt-string arguments))))
(defvar tramp-message-show-message t
"Show Tramp message in the minibuffer.
@@ -1581,8 +1581,8 @@ signal identifier to be raised, remaining arguments passed to
(error-message-string
(list signal
(get signal 'error-message)
- (apply 'format fmt-string arguments)))))
- (signal signal (list (apply 'format fmt-string arguments)))))
+ (apply #'format-message fmt-string arguments)))))
+ (signal signal (list (apply #'format-message fmt-string arguments)))))
(defsubst tramp-error-with-buffer
(buf vec-or-proc signal fmt-string &rest arguments)
@@ -3599,8 +3599,8 @@ connection buffer."
"Tramp failed to connect. If this happens repeatedly, try\n"
" `\\[tramp-cleanup-this-connection]'")))
((eq exit 'timeout)
- (format
- "Timeout reached, see buffer `%s' for details"
+ (format-message
+ "Timeout reached, see buffer ‘%s’ for details"
(tramp-get-connection-buffer vec)))
(t "Login failed")))))
(when (numberp pos)