]> code.delx.au - gnu-emacs/commitdiff
Quoting fixes in lisp/progmodes
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Aug 2015 05:05:43 +0000 (22:05 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Aug 2015 06:12:29 +0000 (23:12 -0700)
* lisp/progmodes/cc-engine.el (c-bos-report-error):
* lisp/progmodes/cpp.el (cpp-edit-reset):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional)
(etags-tags-apropos, list-tags, tags-apropos):
* lisp/progmodes/executable.el (executable-set-magic):
* lisp/progmodes/octave.el (octave-sync-function-file-names)
(octave-help, octave-find-definition-default-filename)
(octave-find-definition):
Respect text quoting style in doc strings and diagnostics.
* lisp/progmodes/cc-langs.el (c-populate-syntax-table):
* lisp/progmodes/verilog-mode.el (verilog-auto-reset-widths):
* lisp/progmodes/vhdl-mode.el (vhdl-electric-quote):
Escape apostrophes in doc strings.
* lisp/progmodes/cmacexp.el (c-macro-expansion):
Use straight quoting in ASCII comment.
* lisp/progmodes/idlwave.el (idlwave-auto-fill-split-string)
(idlwave-pad-keyword):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate)
(vhdl-electric-open-bracket, vhdl-electric-close-bracket):
(vhdl-electric-semicolon, vhdl-electric-comma)
(vhdl-electric-period, vhdl-electric-equal):
Use directed quotes in diagnostics and doc strings.

lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cmacexp.el
lisp/progmodes/cpp.el
lisp/progmodes/ebrowse.el
lisp/progmodes/etags.el
lisp/progmodes/executable.el
lisp/progmodes/idlwave.el
lisp/progmodes/octave.el
lisp/progmodes/verilog-mode.el
lisp/progmodes/vhdl-mode.el

index 1223db3b33e304cb323f9c38047645ef2138ce61..f26b8ec6dd1a59986dce4af65faa35c344ec5728 100644 (file)
@@ -618,11 +618,12 @@ comment at the start of cc-engine.el for more info."
 (defmacro c-bos-report-error ()
   '(unless noerror
      (setq c-parsing-error
 (defmacro c-bos-report-error ()
   '(unless noerror
      (setq c-parsing-error
-          (format "No matching `%s' found for `%s' on line %d"
-                  (elt saved-pos 1)
-                  (elt saved-pos 2)
-                  (1+ (count-lines (point-min)
-                                   (c-point 'bol (elt saved-pos 0))))))))
+          (format-message
+           "No matching `%s' found for `%s' on line %d"
+           (elt saved-pos 1)
+           (elt saved-pos 2)
+           (1+ (count-lines (point-min)
+                            (c-point 'bol (elt saved-pos 0))))))))
 
 (defun c-beginning-of-statement-1 (&optional lim ignore-labels
                                             noerror comma-delim)
 
 (defun c-beginning-of-statement-1 (&optional lim ignore-labels
                                             noerror comma-delim)
index 235ef21d066855aff36946c05f89da265370bd19..0e904d23c5b264766b52b38dc28187d8a20df364 100644 (file)
@@ -327,7 +327,7 @@ the evaluated constant value at compile time."
 
 (defun c-populate-syntax-table (table)
   "Populate the given syntax table as necessary for a C-like language.
 
 (defun c-populate-syntax-table (table)
   "Populate the given syntax table as necessary for a C-like language.
-This includes setting ' and \" as string delimiters, and setting up
+This includes setting \\=' and \" as string delimiters, and setting up
 the comment syntax to handle both line style \"//\" and block style
 \"/*\" \"*/\" comments."
 
 the comment syntax to handle both line style \"//\" and block style
 \"/*\" \"*/\" comments."
 
index 19d0473c42d927aa56330ed0792c866545bc299d..005e71a825e620453509073007806a2e4723b4ac 100644 (file)
@@ -389,8 +389,9 @@ Optional arg DISPLAY non-nil means show messages in the echo area."
                ;; Put the messages inside a comment, so they won't get in
                ;; the way of font-lock, highlighting etc.
                (insert
                ;; Put the messages inside a comment, so they won't get in
                ;; the way of font-lock, highlighting etc.
                (insert
-                (format "/* Preprocessor terminated with status %s\n\n   Messages from `%s\':\n\n"
-                        exit-status cppcommand))
+                (format
+                 "/* Preprocessor terminated with status %s\n\n   Messages from '%s\':\n\n"
+                 exit-status cppcommand))
                (goto-char (+ (point)
                              (nth 1 (insert-file-contents tempname))))
                (insert "\n\n*/\n")))
                (goto-char (+ (point)
                              (nth 1 (insert-file-contents tempname))))
                (insert "\n\n*/\n")))
index 685bb21b43004c2dd61e2736561b4d772e0960e0..3cf17f48b5f2368c33958f7016821b0438fc995d 100644 (file)
@@ -494,9 +494,10 @@ You can also use the keyboard accelerators indicated like this: [K]ey."
     (set-buffer buffer)
     (setq cpp-edit-symbols symbols)
     (erase-buffer)
     (set-buffer buffer)
     (setq cpp-edit-symbols symbols)
     (erase-buffer)
-    (insert "CPP Display Information for `")
+    (insert (substitute-command-keys "CPP Display Information for `"))
     (cpp-make-button (buffer-name cpp-edit-buffer) 'cpp-edit-home)
     (cpp-make-button (buffer-name cpp-edit-buffer) 'cpp-edit-home)
-    (insert "'\n\nClick mouse-2 on item you want to change or use\n"
+    (insert (substitute-command-keys
+            "'\n\nClick mouse-2 on item you want to change or use\n")
            "or switch to this buffer and type the keyboard equivalents.\n"
            "Keyboard equivalents are indicated with brackets like [T]his.\n\n")
     (cpp-make-button "[H]ome (display the C file)" 'cpp-edit-home)
            "or switch to this buffer and type the keyboard equivalents.\n"
            "Keyboard equivalents are indicated with brackets like [T]his.\n\n")
     (cpp-make-button "[H]ome (display the C file)" 'cpp-edit-home)
index 7c785d4ac202e3193a004631281e3eb279f28f16..2443d6f8ca9c6176b2837566108e3b3d98134844 100644 (file)
@@ -3471,7 +3471,7 @@ are not performed."
     (with-output-to-temp-buffer (concat "*Apropos Members*")
       (set-buffer standard-output)
       (erase-buffer)
     (with-output-to-temp-buffer (concat "*Apropos Members*")
       (set-buffer standard-output)
       (erase-buffer)
-      (insert "Members matching `" regexp "'\n\n")
+      (insert (format-message "Members matching ‘%s’\n\n" regexp))
       (cl-loop for s in (ebrowse-list-of-matching-members members regexp) do
                (cl-loop for info in (gethash s members) do
                         (ebrowse-draw-file-member-info info))))))
       (cl-loop for s in (ebrowse-list-of-matching-members members regexp) do
                (cl-loop for info in (gethash s members) do
                         (ebrowse-draw-file-member-info info))))))
index 23f9370767961a2dc3568e78641083e138e74e08..611ba84e25b422fd7f8e872fe4c7ec71b17c5d9d 100644 (file)
@@ -1459,7 +1459,7 @@ hits the start of file."
         (when (symbolp symbs)
           (if (boundp symbs)
              (setq symbs (symbol-value symbs))
         (when (symbolp symbs)
           (if (boundp symbs)
              (setq symbs (symbol-value symbs))
-           (insert "symbol `" (symbol-name symbs) "' has no value\n")
+           (insert (format-message "symbol ‘%s’ has no value\n" symbs))
            (setq symbs nil)))
         (if (vectorp symbs)
            (mapatoms ins-symb symbs)
            (setq symbs nil)))
         (if (vectorp symbs)
            (mapatoms ins-symb symbs)
@@ -1469,13 +1469,13 @@ hits the start of file."
 
 (defun etags-tags-apropos (string) ; Doc string?
   (when tags-apropos-verbose
 
 (defun etags-tags-apropos (string) ; Doc string?
   (when tags-apropos-verbose
-    (princ "Tags in file `")
+    (princ (substitute-command-keys "Tags in file `"))
     (tags-with-face 'highlight (princ buffer-file-name))
     (tags-with-face 'highlight (princ buffer-file-name))
-    (princ "':\n\n"))
+    (princ (substitute-command-keys "':\n\n")))
   (goto-char (point-min))
   (let ((progress-reporter (make-progress-reporter
   (goto-char (point-min))
   (let ((progress-reporter (make-progress-reporter
-                           (format "Making tags apropos buffer for `%s'..."
-                                   string)
+                           (format-message
+                            "Making tags apropos buffer for `%s'..." string)
                            (point-min) (point-max))))
     (while (re-search-forward string nil t)
       (progress-reporter-update progress-reporter (point))
                            (point-min) (point-max))))
     (while (re-search-forward string nil t)
       (progress-reporter-update progress-reporter (point))
@@ -1920,9 +1920,9 @@ directory specification."
                                      'tags-complete-tags-table-file
                                      nil t nil)))
   (with-output-to-temp-buffer "*Tags List*"
                                      'tags-complete-tags-table-file
                                      nil t nil)))
   (with-output-to-temp-buffer "*Tags List*"
-    (princ "Tags in file `")
+    (princ (substitute-command-keys "Tags in file `"))
     (tags-with-face 'highlight (princ file))
     (tags-with-face 'highlight (princ file))
-    (princ "':\n\n")
+    (princ (substitute-command-keys "':\n\n"))
     (save-excursion
       (let ((first-time t)
            (gotany nil))
     (save-excursion
       (let ((first-time t)
            (gotany nil))
@@ -1944,9 +1944,10 @@ directory specification."
   (declare (obsolete xref-find-apropos "25.1"))
   (interactive "sTags apropos (regexp): ")
   (with-output-to-temp-buffer "*Tags List*"
   (declare (obsolete xref-find-apropos "25.1"))
   (interactive "sTags apropos (regexp): ")
   (with-output-to-temp-buffer "*Tags List*"
-    (princ "Click mouse-2 to follow tags.\n\nTags matching regexp `")
+    (princ (substitute-command-keys
+           "Click mouse-2 to follow tags.\n\nTags matching regexp `"))
     (tags-with-face 'highlight (princ regexp))
     (tags-with-face 'highlight (princ regexp))
-    (princ "':\n\n")
+    (princ (substitute-command-keys "':\n\n"))
     (save-excursion
       (let ((first-time t))
        (while (visit-tags-table-buffer (not first-time))
     (save-excursion
       (let ((first-time t))
        (while (visit-tags-table-buffer (not first-time))
index 50e4da93c73aa4b170063984b70b032bdf7efbd2..b057fa684717ee3bcde42f06e06f98bb5ef18ece 100644 (file)
@@ -240,8 +240,9 @@ executable."
                         (save-window-excursion
                           ;; Make buffer visible before question.
                           (switch-to-buffer (current-buffer))
                         (save-window-excursion
                           ;; Make buffer visible before question.
                           (switch-to-buffer (current-buffer))
-                          (y-or-n-p (concat "Replace magic number by `"
-                                            executable-prefix argument "'? "))))
+                          (y-or-n-p (format-message
+                                     "Replace magic number by `%s%s'? "
+                                     executable-prefix argument))))
                     (progn
                       (replace-match argument t t nil 1)
                       (message "Magic number changed to `%s'"
                     (progn
                       (replace-match argument t t nil 1)
                       (message "Magic number changed to `%s'"
index d7594428e8d8a12493f70fa7d8decc96a9f4a5d7..18299c7f116dbca1fffdf6462b9139ff24448cf9 100644 (file)
@@ -293,7 +293,7 @@ extends to the end of the match for the regular expression."
 (defcustom idlwave-auto-fill-split-string t
   "If non-nil then auto fill will split strings with the IDL `+' operator.
 When the line end falls within a string, string concatenation with the
 (defcustom idlwave-auto-fill-split-string t
   "If non-nil then auto fill will split strings with the IDL `+' operator.
 When the line end falls within a string, string concatenation with the
-'+' operator will be used to distribute a long string over lines.
+`+' operator will be used to distribute a long string over lines.
 If nil and a string is split then a terminal beep and warning are issued.
 
 This variable is ignored when `idlwave-fill-comment-line-only' is
 If nil and a string is split then a terminal beep and warning are issued.
 
 This variable is ignored when `idlwave-fill-comment-line-only' is
@@ -768,8 +768,8 @@ Also see help for `idlwave-surround'."
   :type 'boolean)
 
 (defcustom idlwave-pad-keyword t
   :type 'boolean)
 
 (defcustom idlwave-pad-keyword t
-  "Non-nil means pad '=' in keywords (routine calls or defs) like assignment.
-Whenever `idlwave-surround' is non-nil then this affects how '=' is
+  "Non-nil means pad `=' in keywords (routine calls or defs) like assignment.
+Whenever `idlwave-surround' is non-nil then this affects how `=' is
 padded for keywords and for variables.  If t, pad the same as for
 assignments.  If nil then spaces are removed.  With any other value,
 spaces are left unchanged."
 padded for keywords and for variables.  If t, pad the same as for
 assignments.  If nil then spaces are removed.  With any other value,
 spaces are left unchanged."
index 89e0b1052232f2ac9ab66a39a1095cd6ac7f0ed5..70a2b1ab5ad48fa885fa8a5cf8c19839b55897a5 100644 (file)
@@ -1122,7 +1122,7 @@ See Info node `(octave)Function Files'."
         (let* ((func (buffer-substring name-start name-end))
                (file (file-name-sans-extension
                       (file-name-nondirectory buffer-file-name)))
         (let* ((func (buffer-substring name-start name-end))
                (file (file-name-sans-extension
                       (file-name-nondirectory buffer-file-name)))
-               (help-form (format "\
+               (help-form (format-message "\
 a: Use function name `%s'
 b: Use file name `%s'
 q: Don't fix\n" func file))
 a: Use function name `%s'
 b: Use file name `%s'
 q: Don't fix\n" func file))
@@ -1728,12 +1728,12 @@ code line."
                  (dir (file-name-directory
                        (directory-file-name (file-name-directory file)))))
             (replace-match "" nil nil nil 1)
                  (dir (file-name-directory
                        (directory-file-name (file-name-directory file)))))
             (replace-match "" nil nil nil 1)
-            (insert "`")
+            (insert (substitute-command-keys "`"))
             ;; Include the parent directory which may be regarded as
             ;; the category for the FN.
             (help-insert-xref-button (file-relative-name file dir)
                                      'octave-help-file fn)
             ;; Include the parent directory which may be regarded as
             ;; the category for the FN.
             (help-insert-xref-button (file-relative-name file dir)
                                      'octave-help-file fn)
-            (insert "'")))
+            (insert (substitute-command-keys "'"))))
         ;; Make 'See also' clickable.
         (with-syntax-table octave-mode-syntax-table
           (when (re-search-forward "^\\s-*See also:" nil t)
         ;; Make 'See also' clickable.
         (with-syntax-table octave-mode-syntax-table
           (when (re-search-forward "^\\s-*See also:" nil t)
@@ -1816,8 +1816,8 @@ If the environment variable OCTAVE_SRCDIR is set, it is searched first."
            (error "File `%s' not found" name))
        file))
     (`"mex"
            (error "File `%s' not found" name))
        file))
     (`"mex"
-     (if (yes-or-no-p (format "File `%s' may be binary; open? "
-                              (file-name-nondirectory name)))
+     (if (yes-or-no-p (format-message "File `%s' may be binary; open? "
+                                     (file-name-nondirectory name)))
          name
        (user-error "Aborted")))
     (_ name)))
          name
        (user-error "Aborted")))
     (_ name)))
@@ -1847,7 +1847,7 @@ if iskeyword('%s') disp('`%s'' is a keyword') else which('%s') endif\n"
           (when (string-match "from the file \\(.*\\)$" line)
             (setq file (match-string 1 line))))
         (if (not file)
           (when (string-match "from the file \\(.*\\)$" line)
             (setq file (match-string 1 line))))
         (if (not file)
-            (user-error "%s" (or line (format "`%s' not found" fn)))
+            (user-error "%s" (or line (format-message "`%s' not found" fn)))
           (ring-insert find-tag-marker-ring (point-marker))
           (setq file (funcall octave-find-definition-filename-function file))
           (when file
           (ring-insert find-tag-marker-ring (point-marker))
           (setq file (funcall octave-find-definition-filename-function file))
           (when file
index 107dee5803de0f5cef9105d56d4d9bfa8ed3437c..76d85c68c99cf1d8c7e8d7e106a5c00533d2c8d1 100644 (file)
@@ -1054,7 +1054,7 @@ the MSB or LSB of a signal inside an AUTORESET.
 
 If nil, AUTORESET uses \"0\" as the constant.
 
 
 If nil, AUTORESET uses \"0\" as the constant.
 
-If `unbased', AUTORESET used the unbased unsized literal \"'0\"
+If `unbased', AUTORESET used the unbased unsized literal \"\\='0\"
 as the constant. This setting is strongly recommended for
 SystemVerilog designs."
   :type 'boolean
 as the constant. This setting is strongly recommended for
 SystemVerilog designs."
   :type 'boolean
index 1b270e66dda48907dac94ddfc1472465eb456727..47b15d886bc47179430cb8d5947ccb1fdd007cf3 100644 (file)
 '/' or is empty)."
   (let ((val (widget-value widget)))
     (unless (string-match "^\\(\\|.*/\\)$" val)
 '/' or is empty)."
   (let ((val (widget-value widget)))
     (unless (string-match "^\\(\\|.*/\\)$" val)
-      (widget-put widget :error "Invalid directory entry: must end with '/'")
+      (widget-put widget :error "Invalid directory entry: must end with ‘/’")
       widget)))
 
 ;; help string for user options
       widget)))
 
 ;; help string for user options
@@ -8743,7 +8743,7 @@ is omitted or nil."
              (vhdl-comment-insert)))))
     (self-insert-command count)))
 
              (vhdl-comment-insert)))))
     (self-insert-command count)))
 
-(defun vhdl-electric-open-bracket (count) "'[' --> '(', '([' --> '['"
+(defun vhdl-electric-open-bracket (count) "‘[’ --> ‘(’, ‘([’ --> ‘[’"
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (if (= (preceding-char) ?\()
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (if (= (preceding-char) ?\()
@@ -8751,7 +8751,7 @@ is omitted or nil."
        (insert-char ?\( 1))
     (self-insert-command count)))
 
        (insert-char ?\( 1))
     (self-insert-command count)))
 
-(defun vhdl-electric-close-bracket (count) "']' --> ')', ')]' --> ']'"
+(defun vhdl-electric-close-bracket (count) "‘]’ --> ‘)’, ‘)]’ --> ‘]’"
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (progn
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (progn
@@ -8761,7 +8761,7 @@ is omitted or nil."
        (blink-matching-open))
     (self-insert-command count)))
 
        (blink-matching-open))
     (self-insert-command count)))
 
-(defun vhdl-electric-quote (count) "'' --> \""
+(defun vhdl-electric-quote (count) "\\='\\=' --> \""
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (if (= (preceding-char) vhdl-last-input-event)
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (if (= (preceding-char) vhdl-last-input-event)
@@ -8769,7 +8769,7 @@ is omitted or nil."
        (insert-char ?\' 1))
     (self-insert-command count)))
 
        (insert-char ?\' 1))
     (self-insert-command count)))
 
-(defun vhdl-electric-semicolon (count) "';;' --> ' : ', ': ;' --> ' := '"
+(defun vhdl-electric-semicolon (count) "‘;;’ --> ‘ : ’, ‘: ;’ --> ‘ := ’"
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)
@@ -8783,7 +8783,7 @@ is omitted or nil."
            (t (insert-char ?\; 1)))
     (self-insert-command count)))
 
            (t (insert-char ?\; 1)))
     (self-insert-command count)))
 
-(defun vhdl-electric-comma (count) "',,' --> ' <= '"
+(defun vhdl-electric-comma (count) "‘,,’ --> ‘ <= ’"
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)
@@ -8793,7 +8793,7 @@ is omitted or nil."
            (t (insert-char ?\, 1)))
     (self-insert-command count)))
 
            (t (insert-char ?\, 1)))
     (self-insert-command count)))
 
-(defun vhdl-electric-period (count) "'..' --> ' => '"
+(defun vhdl-electric-period (count) "‘..’ --> ‘ => ’"
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)
@@ -8803,7 +8803,7 @@ is omitted or nil."
            (t (insert-char ?\. 1)))
     (self-insert-command count)))
 
            (t (insert-char ?\. 1)))
     (self-insert-command count)))
 
-(defun vhdl-electric-equal (count) "'==' --> ' == '"
+(defun vhdl-electric-equal (count) "‘==’ --> ‘ == ’"
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (cond ((= (preceding-char) vhdl-last-input-event)