]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use `format' on strings without % format directives
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Sep 2021 15:52:53 +0000 (17:52 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Sep 2021 15:52:53 +0000 (17:52 +0200)
* 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.

27 files changed:
lisp/calc/calcalg3.el
lisp/calendar/cal-tex.el
lisp/calendar/icalendar.el
lisp/emulation/viper-ex.el
lisp/frame.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus.el
lisp/gnus/mm-decode.el
lisp/help-fns.el
lisp/jsonrpc.el
lisp/mail/emacsbug.el
lisp/mail/smtpmail.el
lisp/mh-e/mh-seq.el
lisp/net/newst-backend.el
lisp/net/soap-inspect.el
lisp/net/telnet.el
lisp/org/org-agenda.el
lisp/progmodes/compile.el
lisp/progmodes/idlwave.el
lisp/progmodes/verilog-mode.el
lisp/term.el
lisp/textmodes/ispell.el
lisp/textmodes/reftex-index.el
lisp/textmodes/reftex.el
lisp/url/url-http.el
lisp/url/url-ldap.el
lisp/vc/ediff-init.el

index 3cb1886f3bd57f621a7b1d44ab6895974838a208..a61cdb5d0e6521ed64346ea4387bbf6434fe6e77 100644 (file)
                      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)
index 75e106cb3769b01e41fb9a0b6fd1891c8eb157cb..c5b456c4c23fed32afb90751374cea47106ddcc1 100644 (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'.
index 312d5e2f3805c568cf42209d6a4ae784a675e1f1..2d31101e50e5e40c4388ac7242fbf98d428b26e9 100644 (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: ")))
index b1cbcc5a6d4ba75a6ad86bee54c4355813badcfb..ef15779e1bf3ff5f51ab843addde6f5499e9b09e 100644 (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.
index 60234fc2ae963832189063e1a3a33b6ef538ba65..e97b9903df88ca713d891acd1bf6431011bdd8f5 100644 (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)))
 
index bedae0f564f3e651ed5f93b9395e7aad7beaadc5..83c953515efe1ff7193914241ef7c634d9eb18b6 100644 (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)))
index 7c983344de8310fc55f13022e0d33d8987fcf5db..f558360361dd6d59accf548a61d10405480f9ff2 100644 (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))
index 82d1de25f3d53dcc254251b09b52a331de8e0a17..aca4bf2062d96e3f0135dde1e5c563e0a1fa0741 100644 (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
index 63d3905a94a8447720bb8951ff3e57b88bc3b496..6be5cd4a50182f940b432fe9388aef60e96223e3 100644 (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))
index 6b5abcbd7c8e1fbe3ff9c690c3ebc7a09a08c0f8..02db199c7f7a66645c0775fcf8abf909151bbb2b 100644 (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))))))
index 14c93f2fc8e32b36d0f0ef7ac9fd9966eced314d..3da1e8b25e94361cda3a6c3c9387fcece9c193b4 100644 (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.
index ec9f340db86d301cadab2b11e8e8bee3604111fe..bd8aa611e94c2402a41dcdce878bfca048ef221d 100644 (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
index 9cdf39f7f1e60ac47c9db05a5eefd55b4c3a20cf..a50319a455de029a9fd36d1688babfab45010aba 100644 (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))
index dc541943587fabdfaab159d5022547b1b5899434..27ea713d0e52d8c631c7d086baa33e4473231927 100644 (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)))))
index 2192a6879135f15dfe711b28343fea1b4aeaf659..b994b0ed862b5c24684ee1ec4b3726c64f079732 100644 (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
index 1716853923735b43079e74c0498ffdcbac2f2754..1cf07a5ccecc2f0c3dd54a0a08bcf7d769479902 100644 (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 ()
index 3acc18715dd8bdc5f06c0973871f945074d7851e..489e6c7f3e9af16772096b12ab68e5a6d0b294b3 100644 (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
index 431b01b8ba912b67f9b84ecdb8db13afd5154eb3..6b521e8d90be08de1ecbb2695747ff8af6b3dd01 100644 (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
index e95abd863e9ee79f8f9e52c3c0fb403eac31ac72..36f8a6d6b6eca5e85c4bdbdc864a0378b0b20130 100644 (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)
index ef2c21da456bfb0cdea6f30c10f3b516cb318d2c..75d2ea649d19b312eb80c653b4d437063e56c2b7 100644 (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))
index 42b2e5a2481941978567f2a72cbf2194d0b64fa1..d3d0218857383d0c8d0ee21095199a7da80fb7ae 100644 (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))
index 5842bf5f9f5615fb55cc5acf34c83ff171853181..b650ab38711ee32a55d8e3c25ede74ec203a9c93 100644 (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))
 
index a6df4fb7afb36e2ed2b87da998bafb78c76880eb..423c5398dd6a91df08e9d275a32514d4eb969c18 100644 (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"
index c926b0563415161144554bb9d26ea360d685de6b..f7424b60b36f6acfdbb0f5b27136cb25db502102 100644 (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)))
index dbd33fd987513c3ea92e713157f47b4e14062936..44ebedeeaef702cfd94548769d6abf28c7841beb 100644 (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))
                  " ")))
index d26562b7f104c56652a23c9ed0046909b563542e..5d18f85fadfad5955fe34ac009f1d76f92057a22 100644 (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))
index 069364f5a2c14d310b2a248e73ec92fab8cb113e..eaccb7a98c7b9c49010ded43fbd5252382b6a062 100644 (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