emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ff441d3: Fix minor text quoting problems in lisp to


From: Paul Eggert
Subject: [Emacs-diffs] master ff441d3: Fix minor text quoting problems in lisp top level
Date: Sat, 29 Aug 2015 03:32:43 +0000

branch: master
commit ff441d3508add9eed3c5217ae7b0a8800b9fc917
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Fix minor text quoting problems in lisp top level
    
    * lisp/apropos.el (apropos-describe-plist):
    * lisp/cus-theme.el (customize-themes):
    * lisp/dired.el (dired-log):
    * lisp/help-fns.el (describe-variable):
    * lisp/hexl.el (hexl-insert-multibyte-char):
    * lisp/info.el (Info-finder-find-node):
    * lisp/json.el (json-read-string):
    * lisp/novice.el (disabled-command-function)
    (disabled-command-function):
    * lisp/startup.el (normal-mouse-startup-screen):
    * lisp/woman.el (WoMan-log, WoMan-warn):
    Respect text quoting style in doc string or diagnostic.
    * lisp/replace.el (replace-character-fold):
    * src/syntax.c (Fmodify_syntax_entry):
    Escape an apostrophe in a docstring.
    * lisp/tempo.el (tempo-define-template):
    Remove confusing apostrophe from docstring.
    * lisp/whitespace.el (whitespace-mark-x):
    Use directed quotes in docstring.
---
 lisp/apropos.el    |    2 +-
 lisp/cus-theme.el  |    2 +-
 lisp/dired.el      |    2 +-
 lisp/help-fns.el   |   17 +++++++++++------
 lisp/hexl.el       |    2 +-
 lisp/info.el       |    2 +-
 lisp/json.el       |    2 +-
 lisp/novice.el     |    7 ++++---
 lisp/replace.el    |    2 +-
 lisp/startup.el    |    3 ++-
 lisp/tempo.el      |    2 +-
 lisp/whitespace.el |    4 ++--
 lisp/woman.el      |    4 ++--
 src/syntax.c       |    2 +-
 14 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/lisp/apropos.el b/lisp/apropos.el
index 73f86df..ec21296 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -1205,7 +1205,7 @@ If non-nil, TEXT is a string that will be printed as a 
heading."
     (set-buffer standard-output)
     (princ "Symbol ")
     (prin1 symbol)
-    (princ "'s plist is\n (")
+    (princ (substitute-command-keys "'s plist is\n ("))
     (put-text-property (+ (point-min) 7) (- (point) 14)
                       'face 'apropos-symbol)
     (insert (apropos-format-plist symbol "\n  "))
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index bc221e1..7693c70 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -587,7 +587,7 @@ Theme files are named *-theme.el in `"))
                 :follow-link 'mouse-face
                 :action (lambda (_widget &rest _ignore)
                           (describe-variable 'custom-theme-load-path)))
-  (widget-insert "'.\n\n")
+  (widget-insert (substitute-command-keys "'.\n\n"))
 
   ;; If the user has made customizations, display a warning and
   ;; provide buttons to disable or convert them.
diff --git a/lisp/dired.el b/lisp/dired.el
index f47c066..206de37 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3567,7 +3567,7 @@ Thus, use \\[backward-page] to find the beginning of a 
group of errors."
               (unless (bolp)
                 (insert "\n"))
               (insert (current-time-string)
-                      "\tBuffer `" (buffer-name obuf) "'\n")
+                      (format-message "\tBuffer ‘%s’\n" (buffer-name obuf)))
               (goto-char (point-max))
               (insert "\f\n")))))))
 
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 5f0dc87..a1d121c 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -746,7 +746,7 @@ it is displayed along with the global value."
                      (princ "Its ")))
                (if valvoid
                    (princ " is void as a variable.")
-                 (princ "'s "))))
+                 (princ (substitute-command-keys "’s ")))))
            (unless valvoid
              (with-current-buffer standard-output
                (setq val-start-pos (point))
@@ -859,11 +859,14 @@ it is displayed along with the global value."
               ((not permanent-local))
               ((bufferp locus)
                (setq extra-line t)
-               (princ "  This variable's buffer-local value is permanent.\n"))
+               (princ
+                (substitute-command-keys
+                 "  This variable's buffer-local value is permanent.\n")))
               (t
                (setq extra-line t)
-                (princ "  This variable's value is permanent \
-if it is given a local binding.\n")))
+                (princ (substitute-command-keys
+                       "  This variable's value is permanent \
+if it is given a local binding.\n"))))
 
              ;; Mention if it's an alias.
               (unless (eq alias variable)
@@ -896,7 +899,8 @@ if it is given a local binding.\n")))
                                       (dir-locals-find-file
                                        (buffer-file-name buffer))))
                           (dir-file t))
-                     (princ "  This variable's value is directory-local")
+                     (princ (substitute-command-keys
+                             "  This variable's value is directory-local"))
                      (if (null file)
                          (princ ".\n")
                        (princ ", set ")
@@ -918,7 +922,8 @@ if it is given a local binding.\n")))
                           file 'type 'help-dir-local-var-def
                           'help-args (list variable file)))
                        (princ (substitute-command-keys "’.\n"))))
-                 (princ "  This variable's value is file-local.\n")))
+                 (princ (substitute-command-keys
+                         "  This variable's value is file-local.\n"))))
 
              (when (memq variable ignored-local-variables)
                (setq extra-line t)
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 3e0ea41..4aa76d2 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -935,7 +935,7 @@ and their encoded form is inserted byte by byte."
                     (mapconcat (function (lambda (c) (format "%x" c)))
                                internal " "))
               (if (yes-or-no-p
-                   (format
+                   (format-message
                     "Insert char 0x%x's internal representation \"%s\"? "
                     ch internal-hex))
                   (setq encoded internal)
diff --git a/lisp/info.el b/lisp/info.el
index 21dbca9..2c92df4 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3763,7 +3763,7 @@ Build a menu of the possible matches."
     ;; I think nxml is the only exception - maybe it should be just be renamed.
     (let ((str (ignore-errors (lm-commentary (find-library-name nodename)))))
       (if (null str)
-         (insert "Can't find package description.\n\n")
+         (insert "Can’t find package description.\n\n")
        (insert
         (with-temp-buffer
           (insert str)
diff --git a/lisp/json.el b/lisp/json.el
index eaf8596..5392a13 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -286,7 +286,7 @@ representation will be parsed correctly."
 (defun json-read-string ()
   "Read the JSON string at point."
   (unless (char-equal (json-peek) ?\")
-    (signal 'json-string-format (list "doesn't start with '\"'!")))
+    (signal 'json-string-format (list "doesn’t start with ‘\"’!")))
   ;; Skip over the '"'
   (json-advance)
   (let ((characters '())
diff --git a/lisp/novice.el b/lisp/novice.el
index ce6e16f..18ffa5d 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -65,7 +65,8 @@ If nil, the feature is disabled, i.e., all commands work 
normally.")
        (if (stringp (get cmd 'disabled))
            (princ (get cmd 'disabled))
         (princ "It is disabled because new users often find it confusing.\n")
-        (princ "Here's the first part of its description:\n\n")
+        (princ (substitute-command-keys
+                "Here's the first part of its description:\n\n"))
         ;; Keep only the first paragraph of the documentation.
           (with-current-buffer "*Disabled Command*" ;; standard-output
           (goto-char (point-max))
@@ -80,11 +81,11 @@ If nil, the feature is disabled, i.e., all commands work 
normally.")
             (goto-char (point-max))
             (indent-rigidly start (point) 3))))
        (princ "\n\nDo you want to use this command anyway?\n\n")
-       (princ "You can now type
+       (princ (substitute-command-keys "You can now type
 y   to try it and enable it (no questions if you use it again).
 n   to cancel--don't try the command, and it remains disabled.
 SPC to try the command just this once, but leave it disabled.
-!   to try it, and enable all disabled commands for this session only.")
+!   to try it, and enable all disabled commands for this session only."))
         ;; Redundant since with-output-to-temp-buffer will do it anyway.
         ;; (with-current-buffer standard-output
         ;;   (help-mode))
diff --git a/lisp/replace.el b/lisp/replace.el
index 26870a3..be73cab 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -35,7 +35,7 @@
 
 (defcustom replace-character-fold nil
   "Non-nil means `query-replace' should do character folding in matches.
-This means, for instance, that ' will match a large variety of
+This means, for instance, that \\=' will match a large variety of
 unicode quotes."
   :type 'boolean
   :group 'matching
diff --git a/lisp/startup.el b/lisp/startup.el
index 1cb3bb6..8c63ed2 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1935,7 +1935,8 @@ To quit a partially entered command, type Control-g.\n")
   (insert-button "Visit New File"
                 'action (lambda (_button) (call-interactively 'find-file))
                 'follow-link t)
-  (insert "\t\tSpecify a new file's name, to edit the file\n")
+  (insert (substitute-command-keys
+          "\t\tSpecify a new file's name, to edit the file\n"))
   (insert-button "Open Home Directory"
                 'action (lambda (_button) (dired "~"))
                 'follow-link t)
diff --git a/lisp/tempo.el b/lisp/tempo.el
index 92e1ea7..6e2f978 100644
--- a/lisp/tempo.el
+++ b/lisp/tempo.el
@@ -270,7 +270,7 @@ The elements in ELEMENTS can be of several types:
  - nil: It is ignored.
  - Anything else: It is evaluated and the result is treated as an
    element to be inserted.  One additional tag is useful for these
-   cases.  If an expression returns a list '(l foo bar), the elements
+   cases.  If an expression returns a list (l foo bar), the elements
    after `l' will be inserted according to the usual rules.  This makes
    it possible to return several elements from one expression."
   (let* ((template-name (intern (concat "tempo-template-"
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index ddc37f1..3191496 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -1931,13 +1931,13 @@ cleaning up these problems."
 
 
 (defun whitespace-mark-x (nchars condition)
-  "Insert the mark ('X' or ' ') after NCHARS depending on CONDITION."
+  "Insert the mark (‘X’ or ‘ ’) after NCHARS depending on CONDITION."
   (forward-char nchars)
   (insert (if condition "X" " ")))
 
 
 (defun whitespace-insert-option-mark (the-list the-value)
-  "Insert the option mark ('X' or ' ') in toggle options buffer."
+  "Insert the option mark (‘X’ or ‘ ’) in toggle options buffer."
   (goto-char (point-min))
   (forward-line 2)
   (dolist (sym  the-list)
diff --git a/lisp/woman.el b/lisp/woman.el
index e903caa..de2cbc1 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -4548,11 +4548,11 @@ Format paragraphs upto TO."
 
 (defun WoMan-log (format &rest args)
   "Log a message out of FORMAT control string and optional ARGS."
-  (WoMan-log-1 (apply 'format format args)))
+  (WoMan-log-1 (apply #'format-message format args)))
 
 (defun WoMan-warn (format &rest args)
   "Log a warning message out of FORMAT control string and optional ARGS."
-  (setq format (apply 'format format args))
+  (setq format (apply #'format-message format args))
   (WoMan-log-1 (concat "**  " format)))
 
 ;; request is not used dynamically by any callees.
diff --git a/src/syntax.c b/src/syntax.c
index 30560af..dc82210 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1129,7 +1129,7 @@ The first character of NEWENTRY should be one of the 
following:
   _           symbol constituent.   .   punctuation.
   (           open-parenthesis.     )   close-parenthesis.
   "           string quote.         \\   escape.
-  $           paired delimiter.     '   expression quote or prefix operator.
+  $           paired delimiter.     \\='   expression quote or prefix operator.
   <           comment starter.      >   comment ender.
   /           character-quote.      @   inherit from parent table.
   |           generic string fence. !   generic comment fence.



reply via email to

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