Don't use `format' on strings without % format directives

* lisp/vc/ediff-init.el (ediff-BAD-INFO):
* lisp/url/url-ldap.el (url-ldap):
* lisp/url/url-http.el (url-http--user-agent-default-string):
* lisp/textmodes/reftex.el (reftex-access-parse-file):
* lisp/textmodes/reftex-index.el (reftex-index-phrases-info):
* lisp/textmodes/ispell.el (ispell-create-debug-buffer):
* lisp/term.el (serial-read-speed):
* lisp/progmodes/verilog-mode.el (verilog-scan-debug):
* lisp/progmodes/idlwave.el (idlwave-find-module):
* lisp/progmodes/compile.el (compilation-revert-buffer):
* lisp/org/org-agenda.el (org-search-view):
* lisp/net/telnet.el (telnet-revert-buffer):
* lisp/net/soap-inspect.el (soap-sample-value-for-xs-simple-type):
* lisp/net/newst-backend.el (newsticker--cache-read):
* lisp/mh-e/mh-seq.el (mh-msg-is-in-seq):
* lisp/mail/smtpmail.el (smtpmail-via-smtp):
* lisp/mail/emacsbug.el (report-emacs-bug):
* lisp/jsonrpc.el (jsonrpc-error):
* lisp/help-fns.el (describe-variable):
* lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt):
* lisp/gnus/gnus.el (gnus-group-startup-message):
(gnus-group-startup-message):
* lisp/gnus/gnus-group.el (gnus-group-restart):
* lisp/frame.el (make-frame-on-display):
* lisp/emulation/viper-ex.el (ex-help):
* lisp/calendar/icalendar.el (icalendar--convert-ical-to-diary):
(icalendar--add-diary-entry):
* lisp/calendar/cal-tex.el (cal-tex-end-document):
* lisp/calc/calcalg3.el (math-ninteg-romberg): Don't use `format'
on strings that have no % format directives in them.
This commit is contained in:
Lars Ingebrigtsen 2021-09-21 17:52:53 +02:00
parent 18ad9dfe95
commit 43c1ee90cb
27 changed files with 35 additions and 41 deletions

View file

@ -1484,7 +1484,7 @@
h (cdr h)))
(setq curh (math-div-float curh '(float 9 0))))
ss
(math-reject-arg nil (format "*Integral failed to converge"))))))
(math-reject-arg nil "*Integral failed to converge")))))
(defun math-ninteg-evaluate (expr x mode)

View file

@ -1648,10 +1648,10 @@ informative header, and run HOOK."
(goto-char (point-min))
;; FIXME auctex equivalents?
(cal-tex-comment
(format "\tThis buffer was produced by cal-tex.el.
"\tThis buffer was produced by cal-tex.el.
\tTo print a calendar, type
\t\tM-x tex-buffer RET
\t\tM-x tex-print RET")))
\t\tM-x tex-print RET"))
(defun cal-tex-insert-preamble (weeks &optional class-options append)
"Initialize the output LaTeX calendar buffer, `cal-tex-buffer'.

View file

@ -2182,8 +2182,7 @@ written into the buffer `*icalendar-errors*'."
(setq diary-string "")
(mapc (lambda (_datestring)
(setq diary-string
(concat diary-string
(format "......"))))
(concat diary-string "......")))
(icalendar--split-value rdate)))
;; non-recurring event
;; all-day event
@ -2528,7 +2527,7 @@ the entry."
summary)))
(when summary
(setq non-marking
(y-or-n-p (format "Make appointment non-marking? "))))
(y-or-n-p "Make appointment non-marking? ")))
(unless diary-filename
(setq diary-filename
(read-file-name "Add appointment to this diary file: ")))

View file

@ -1876,11 +1876,11 @@ reversed."
(message "Type `i' to search for a specific topic"))
(error (beep 1)
(with-output-to-temp-buffer " *viper-info*"
(princ (format "
(princ "
The Info file for Viper does not seem to be installed.
This file is part of the standard distribution of Emacs.
Please contact your system administrator. "))))))
Please contact your system administrator. ")))))
;; Ex source command.
;; Loads the file specified as argument or viper-custom-file-name.

View file

@ -701,9 +701,8 @@ Return nil if we don't know how to interpret DISPLAY."
"Make a frame on display DISPLAY.
The optional argument PARAMETERS specifies additional frame parameters."
(interactive (if (fboundp 'x-display-list)
(list (completing-read
(format "Make frame on display: ")
(x-display-list)))
(list (completing-read "Make frame on display: "
(x-display-list)))
(user-error "This Emacs build does not support X displays")))
(make-frame (cons (cons 'display display) parameters)))

View file

@ -4398,8 +4398,7 @@ If FORCE, force saving whether it is necessary or not."
(defun gnus-group-restart (&optional _arg)
"Force Gnus to read the .newsrc file."
(interactive nil gnus-group-mode)
(when (gnus-yes-or-no-p
(format "Are you sure you want to restart Gnus? "))
(when (gnus-yes-or-no-p "Are you sure you want to restart Gnus? ")
(gnus-save-newsrc-file)
(gnus-clear-system)
(gnus)))

View file

@ -798,7 +798,7 @@ be used directly.")
(goto-char (point-min))
t)))
(insert
(format "
"
_ ___ _ _
_ ___ __ ___ __ _ ___
__ _ ___ __ ___
@ -817,7 +817,7 @@ be used directly.")
_
__
"))
")
;; And then hack it.
(gnus-indent-rigidly (point-min) (point-max)
(/ (max (- (window-width) (or x 46)) 0) 2))

View file

@ -1676,8 +1676,7 @@ If RECURSIVE, search recursively."
((eq mm-decrypt-option 'never) nil)
((eq mm-decrypt-option 'always) t)
((eq mm-decrypt-option 'known) t)
(t (y-or-n-p
(format "Decrypt (S/MIME) part? "))))
(t (y-or-n-p "Decrypt (S/MIME) part? ")))
(mm-view-pkcs7 parts from))
(goto-char (point-min))
;; The encrypted document is a MIME part, and may use either

View file

@ -1181,7 +1181,7 @@ it is displayed along with the global value."
(princ (format "Local in buffer %s; "
(buffer-name buffer))))
((terminal-live-p locus)
(princ (format "It is a terminal-local variable; ")))
(princ "It is a terminal-local variable; "))
(t
(princ (format "It is local to %S" locus))))
(if (not (default-boundp variable))

View file

@ -219,7 +219,7 @@ object, using the keywords `:code', `:message' and `:data'."
(jsonrpc-error-message . ,msg))))
(cl-destructuring-bind (&key code message data) args
(signal 'jsonrpc-error
`(,(format "[jsonrpc] error ")
`("[jsonrpc] error "
(jsonrpc-error-code . ,code)
(jsonrpc-error-message . ,message)
(jsonrpc-error-data . ,data))))))

View file

@ -340,7 +340,7 @@ usually do not have translators for other languages.\n\n")))
(insert (format "\nFeatures:\n%s\n" features))
(fill-region (line-beginning-position 0) (point))
(insert (format "\nMemory information:\n"))
(insert "\nMemory information:\n")
(pp (garbage-collect) (current-buffer))
;; This is so the user has to type something in order to send easily.

View file

@ -829,15 +829,15 @@ Returns an error if the server cannot be contacted."
(when (or (member 'onex supported-extensions)
(member 'xone supported-extensions))
(smtpmail-command-or-throw process (format "ONEX")))
(smtpmail-command-or-throw process "ONEX"))
(when (and smtpmail-debug-verb
(or (member 'verb supported-extensions)
(member 'xvrb supported-extensions)))
(smtpmail-command-or-throw process (format "VERB")))
(smtpmail-command-or-throw process "VERB"))
(when (member 'xusr supported-extensions)
(smtpmail-command-or-throw process (format "XUSR")))
(smtpmail-command-or-throw process "XUSR"))
;; MAIL FROM:<sender>
(let ((size-part

View file

@ -187,7 +187,7 @@ MESSAGE appears."
(message "Message %d%s is in sequences: %s"
message
(cond (dest-folder (format " (to be refiled to %s)" dest-folder))
(deleted-flag (format " (to be deleted)"))
(deleted-flag " (to be deleted)")
(t ""))
(mapconcat #'concat
(mh-list-to-string (mh-seq-containing-msg message t))

View file

@ -2183,7 +2183,7 @@ FEED is a symbol!"
(progn
(when (y-or-n-p "Old newsticker cache file exists. Read it? ")
(newsticker--cache-read-version1))
(when (y-or-n-p (format "Delete old newsticker cache file? "))
(when (y-or-n-p "Delete old newsticker cache file? ")
(delete-file newsticker-cache-filename)))
(dolist (f (append newsticker-url-list-defaults newsticker-url-list))
(newsticker--cache-read-feed (car f)))))

View file

@ -124,7 +124,7 @@ This is a specialization of `soap-sample-value' for
(format "a string between %d and %d chars long" low high))
(low (format "a string at least %d chars long" low))
(high (format "a string at most %d chars long" high))
(t (format "a string OOPS")))))
(t "a string OOPS"))))
((soap-xs-simple-type-integer-range type)
(cl-destructuring-bind (min . max) (soap-xs-simple-type-integer-range type)
(cond

View file

@ -107,7 +107,7 @@ rejecting one login and prompting again for a username and password.")
(let (revert-buffer-function)
(revert-buffer ignore-auto noconfirm))
(if (or noconfirm
(yes-or-no-p (format "Restart connection? ")))
(yes-or-no-p "Restart connection? "))
(apply telnet-connect-command))))
(defun telnet-c-z ()

View file

@ -4531,7 +4531,7 @@ is active."
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
'mouse-face 'highlight
'help-echo (format "mouse-2 or RET jump to location")))
'help-echo "mouse-2 or RET jump to location"))
(full-words org-agenda-search-view-force-full-words)
(org-agenda-text-search-extra-files org-agenda-text-search-extra-files)
regexp rtn rtnall files file pos inherited-tags

View file

@ -2260,7 +2260,7 @@ by replacing the first word, e.g., `compilation-scroll-output' from
(if buffer-file-name
(let (revert-buffer-function)
(revert-buffer ignore-auto noconfirm))
(if (or noconfirm (yes-or-no-p (format "Restart compilation? ")))
(if (or noconfirm (yes-or-no-p "Restart compilation? "))
(apply #'compilation-start compilation-arguments))))
(defvar compilation-current-error nil

View file

@ -7786,7 +7786,7 @@ force class query for object methods."
(if (or (not this-buffer)
(assoc default list))
(format-prompt "Module" default)
(format "Module in this file: "))
"Module in this file: ")
list))
type class)
(if (string-match "\\`\\s-*\\'" name)

View file

@ -3563,7 +3563,7 @@ either is ok to parse as a non-comment, or `verilog-insert' was used."
(defun verilog-scan-debug ()
"For debugging, show with display face results of `verilog-scan'."
(font-lock-mode 0)
;;(if dbg (setq dbg (concat dbg (format "verilog-scan-debug\n"))))
;;(if dbg (setq dbg (concat dbg "verilog-scan-debug\n")))
(save-excursion
(goto-char (point-min))
(remove-text-properties (point-min) (point-max) '(face nil))

View file

@ -4322,8 +4322,7 @@ Try to be nice by providing useful defaults and history."
"Speed (default nil = set by port): ")
(h
(format-prompt "Speed" (format "%s b/s" h)))
(t
(format "Speed (b/s): ")))
(t "Speed (b/s): "))
nil nil nil '(history . 1) nil nil)))
(when (or (null x) (and (stringp x) (zerop (length x))))
(setq x h))

View file

@ -758,8 +758,7 @@ See `ispell-buffer-with-debug' for an example of use."
(let ((ispell-debug-buffer (get-buffer-create "*ispell-debug*")))
(with-current-buffer ispell-debug-buffer
(if append
(insert
(format "-----------------------------------------------\n"))
(insert "-----------------------------------------------\n")
(erase-buffer)))
ispell-debug-buffer))

View file

@ -1666,7 +1666,7 @@ this function repeatedly."
(repeat
(princ (format " Index entry: %s\n" phrase)))
(t
(princ (format " Index key: <<Given by the match>>\n"))))
(princ " Index key: <<Given by the match>>\n")))
(princ (format " Example: %s\n" example))
(terpri)
(princ (format "Total matches: %s in %s\n"

View file

@ -1208,7 +1208,7 @@ Valid actions are: readable, restore, read, kill, write."
(if (file-writable-p file)
(with-temp-file file
(message "Writing parse file %s" (abbreviate-file-name file))
(insert (format ";; RefTeX parse info file\n"))
(insert ";; RefTeX parse info file\n")
(insert (format ";; File: %s\n" master))
(insert (format ";; User: %s (%s)\n\n"
(user-login-name) (user-full-name)))

View file

@ -225,7 +225,7 @@ request.")
(os-info (unless (and (listp url-privacy-level)
(memq 'os url-privacy-level))
(format "(%s; %s)" url-system-type url-os-type)))
(url-info (format "URL/Emacs")))
(url-info "URL/Emacs"))
(string-join (delq nil (list package-info url-info
emacs-info os-info))
" ")))

View file

@ -218,7 +218,7 @@ URL can be a URL string, or a URL record of the type returned by
"</td></tr>\n")
;; Multiple matches, slightly uglier
(insert " <tr>\n"
(format " <td valign=top>")
" <td valign=top>"
(url-ldap-attribute-pretty-name (car attr)) "</td><td>"
(mapconcat (lambda (x)
(url-ldap-attribute-pretty-desc (car attr) x))

View file

@ -490,11 +490,11 @@ set local variables that determine how the display looks like."
(defconst ediff-BAD-DIFF-NUMBER
;; %S stands for this-command, %d - diff number, %d - max diff
"%S: Bad diff region number, %d. Valid numbers are 1 to %d")
(defconst ediff-BAD-INFO (format "
(defconst ediff-BAD-INFO "
*** The Info file for Ediff, a part of the standard distribution
*** of Emacs, does not seem to be properly installed.
***
*** Please contact your system administrator. "))
*** Please contact your system administrator. ")
;; Selective browsing