(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-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."
;; 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")))
(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)
- (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)
(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))))))
(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)
(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))
- (princ "':\n\n"))
+ (princ (substitute-command-keys "':\n\n")))
(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))
'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))
- (princ "':\n\n")
+ (princ (substitute-command-keys "':\n\n"))
(save-excursion
(let ((first-time t)
(gotany nil))
(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))
- (princ "':\n\n")
+ (princ (substitute-command-keys "':\n\n"))
(save-excursion
(let ((first-time t))
(while (visit-tags-table-buffer (not first-time))
(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'"
(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
: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."
(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))
(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)
- (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)
(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)))
(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
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
'/' 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
(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) ?\()
(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
(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)
(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)
(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)
(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)
(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)