(cond ((not previous))
((member key key-list)
(push (cons (bibtex-current-line)
- (format "Duplicate key `%s'" key))
+ (format-message "Duplicate key `%s'" key))
error-list))
((and bibtex-maintain-sorted-entries
(not (bibtex-lessp previous current)))
(cdr (assoc-string (car key) bibtex-reference-keys)))
(bibtex-search-entry (car key))
(push (cons (bibtex-current-line)
- (format "Duplicate key `%s' in %s" (car key)
- (abbreviate-file-name (buffer-file-name buffer))))
+ (format-message
+ "Duplicate key `%s' in %s" (car key)
+ (abbreviate-file-name (buffer-file-name buffer))))
error-list))))
(when test-thoroughly
(if (setq idx (nth 3 field))
(bibtex-vec-push alt-expect idx (car field))
(push (cons beg-line
- (format "Required field `%s' missing"
- (car field)))
+ (format-message
+ "Required field `%s' missing"
+ (car field)))
error-list)))
(dotimes (idx num-alt)
(unless (aref alt-fields idx)
(push (cons beg-line
- (format "Alternative fields `%s' missing"
- (aref alt-expect idx)))
+ (format-message
+ "Alternative fields `%s' missing"
+ (aref alt-expect idx)))
error-list))))))))
(bibtex-progress-message 'done)))))
(unless (eq major-mode 'compilation-mode) (compilation-mode))
(let ((inhibit-read-only t))
(delete-region (point-min) (point-max))
- (insert "BibTeX mode command `bibtex-validate'\n"
+ (insert (substitute-command-keys
+ "BibTeX mode command `bibtex-validate'\n")
(if syntax-error
"Maybe undetected errors due to syntax errors. \
Correct and validate again.\n"
(if (or (and strings (bibtex-string= entry-type "string"))
(assoc-string entry-type bibtex-entry-alist t))
(if (member key key-list)
- (push (format "%s:%d: Duplicate key `%s'\n"
- (buffer-file-name)
- (bibtex-current-line) key)
+ (push (format-message
+ "%s:%d: Duplicate key `%s'\n"
+ (buffer-file-name)
+ (bibtex-current-line) key)
error-list)
(push key key-list))))
(push (cons buffer key-list) buffer-key-list)))))
(dolist (key (cdr (assq buffer buffer-key-list)))
(when (assoc-string key current-keys)
(bibtex-search-entry key)
- (push (format "%s:%d: Duplicate key `%s' in %s\n"
- (buffer-file-name) (bibtex-current-line) key
- (abbreviate-file-name (buffer-file-name buffer)))
+ (push (format-message
+ "%s:%d: Duplicate key `%s' in %s\n"
+ (buffer-file-name) (bibtex-current-line) key
+ (abbreviate-file-name (buffer-file-name buffer)))
error-list))))))
;; Process error list
(unless (eq major-mode 'compilation-mode) (compilation-mode))
(let ((inhibit-read-only t))
(delete-region (point-min) (point-max))
- (insert "BibTeX mode command `bibtex-validate-globally'\n\n")
+ (insert (substitute-command-keys
+ "BibTeX mode command `bibtex-validate-globally'\n\n"))
(dolist (err (sort error-list 'string-lessp)) (insert err))
(set-buffer-modified-p nil))
(goto-char (point-min))
(bibtex-display-entries entries)
(message "No BibTeX entries %smatching `%s'"
(if (string= "" field) ""
- (format "with field `%s' " field))
+ (format-message "with field `%s' " field))
regexp)))
entries))
(define-key menu-map [c-s0] '("--"))
(define-key menu-map [conf-quote-normal]
'(menu-item "Set quote syntax normal" conf-quote-normal
- :help "Set the syntax of \' and \" to punctuation"))
+ :help "Set the syntax of \\=' and \" to punctuation"))
(define-key menu-map [conf-align-assignments]
'(menu-item "Align assignments" conf-align-assignments
:help "Align assignments"))
(defun conf-quote-normal (arg)
- "Set the syntax of ' and \" to punctuation.
-With prefix arg, only do it for ' if 1, or only for \" if 2.
+ "Set the syntax of \\=' and \" to punctuation.
+With prefix arg, only do it for \\=' if 1, or only for \" if 2.
This only affects the current buffer. Some conf files use quotes
to delimit strings, while others allow quotes as simple parts of
the assigned value. In those files font locking will be wrong,
(insert "\n\t"))
(insert (car guess) " ")
(setq guess (cdr guess)))
- (insert "\nUse option `i' to accept this spelling and put it in your private dictionary.\n")))
+ (insert (substitute-command-keys
+ "\nUse option `i' to accept this spelling and put it in your private dictionary.\n"))))
(while choices
(when (> (+ 7 (current-column)
(length (car choices))
"Search for REGEXP, starting from point, and narrow to page it is in."
(interactive (list
(read-string
- (format "Search for `%s' (end with RET): "
- (or pages-last-search "regexp")))))
+ (format-message "Search for `%s' (end with RET): "
+ (or pages-last-search "regexp")))))
(if (equal regexp "")
(setq regexp pages-last-search)
(setq pages-last-search regexp))
(list nil
nil
(read-string
- (format "Select according to `%s' (end with RET): "
- (or pages-directory-previous-regexp "regexp")))))
+ (format-message
+ "Select according to `%s' (end with RET): "
+ (or pages-directory-previous-regexp "regexp")))))
((> (prefix-numeric-value current-prefix-arg) 0)
(list t t nil))
((< (prefix-numeric-value current-prefix-arg) 0)
(list nil
t
(read-string
- (format "Select according to `%s' (end with RET): "
- (or pages-directory-previous-regexp "regexp")))))))
+ (format-message
+ "Select according to `%s' (end with RET): "
+ (or pages-directory-previous-regexp "regexp")))))))
(if (equal regexp "")
(setq regexp pages-directory-previous-regexp)
The supported characters and potential disadvantages are:
?\\\" Makes \" in text start a string.
- ?' Makes ' in text start a string.
+ ?\\=' Makes \\=' in text start a string.
?- Makes -- in text start a comment.
-When only one of ?\\\" or ?' are included, \"'\" or '\"', as can be found in
+When only one of ?\\\" or ?\\=' are included, \"\\='\" or \\='\"\\=', as can be found in
DTDs, start a string. To partially avoid this problem this also makes these
self insert as named entities depending on `sgml-quick-keys'.
(define-derived-mode sgml-mode text-mode '(sgml-xml-mode "XML" "SGML")
"Major mode for editing SGML documents.
Makes > match <.
-Keys <, &, SPC within <>, \", / and ' can be electric depending on
+Keys <, &, SPC within <>, \", / and \\=' can be electric depending on
`sgml-quick-keys'.
An argument of N to a tag-inserting command means to wrap it around
the next N words. In Transient Mark mode, when the mark is active,
N defaults to -1, which means to wrap it around the current region.
-If you like upcased tags, put (setq sgml-transformation-function 'upcase)
+If you like upcased tags, put (setq sgml-transformation-function \\='upcase)
in your init file.
Use \\[sgml-validate] to validate your document with an SGML parser.
If you mainly create your own documents, `sgml-specials' might be
interesting. But note that some HTML 2 browsers can't handle `''.
To work around that, do:
- (eval-after-load \"sgml-mode\" '(aset sgml-char-names ?' nil))
+ (eval-after-load \"sgml-mode\" '(aset sgml-char-names ?\\=' nil))
\\{html-mode-map}"
(setq-local sgml-display-text html-display-text)
If optional argument HERE is non-nil, insert info at point."
(interactive "P")
(let ((version-string
- (format "Version of `texinfmt.el': %s" texinfmt-version)))
+ (format-message "Version of `texinfmt.el': %s" texinfmt-version)))
(if here
(insert version-string)
(if (called-interactively-p 'interactive)
(let ((arg (texinfo-parse-arg-discard)))
(insert " "
texinfo-region-buffer-name
- " buffer for: `")
+ (format-message " buffer for: `"))
(insert (file-name-nondirectory (expand-file-name arg)))
- (insert "', -*-Text-*-\n")))
+ (insert (format-message "', -*-Text-*-\n"))))
;; Else no `@setfilename' line
(insert " "
texinfo-region-buffer-name
" buffer -*-Text-*-\n"))
- (insert "produced by `texinfo-format-region'\n"
+ (insert (format-message "produced by `texinfo-format-region'\n")
"from a region in: "
(if (buffer-file-name input-buffer)
- (concat "`"
- (file-name-sans-versions
- (file-name-nondirectory
- (buffer-file-name input-buffer)))
- "'")
- (concat "buffer `" (buffer-name input-buffer) "'"))
- "\nusing `texinfmt.el' version "
- texinfmt-version
- ".\n\n")
+ (format-message "`%s'"
+ (file-name-sans-versions
+ (file-name-nondirectory
+ (buffer-file-name input-buffer))))
+ (format-message "buffer `%s'" (buffer-name input-buffer)))
+ (format-message "\nusing `texinfmt.el' version ")
+ texinfmt-version
+ ".\n\n")
;; Now convert for real.
(goto-char (point-min))
;; Insert info about how this file was made.
(insert "Info file: "
texinfo-format-filename ", -*-Text-*-\n"
- "produced by `texinfo-format-buffer'\n"
+ (format-message "produced by `texinfo-format-buffer'\n")
;; Date string removed so that regression testing is easier.
;; "on "
;; (insert (format-time-string "%e %b %Y")) " "
"from file"
(if (buffer-file-name input-buffer)
- (concat " `"
+ (format-message " `%s'"
(file-name-sans-versions
(file-name-nondirectory
- (buffer-file-name input-buffer)))
- "'")
- (concat "buffer `" (buffer-name input-buffer) "'"))
- "\nusing `texinfmt.el' version "
+ (buffer-file-name input-buffer))))
+ (format-message "buffer `%s'" (buffer-name input-buffer)))
+ (format-message "\nusing `texinfmt.el' version ")
texinfmt-version
".\n\n")
;; Return data for indices.
\(See \\[describe-mode] .)"
(interactive "*p")
(and (2C-other)
- (if (y-or-n-p (concat "Overwrite associated buffer `"
- (buffer-name (2C-other))
- "'? "))
+ (if (y-or-n-p (format-message "Overwrite associated buffer ā%sā? "
+ (buffer-name (2C-other))))
(with-current-buffer (2C-other)
(erase-buffer))
(signal 'quit nil)))