emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master efbaf95 1/5: Remove more XEmacs compat functions fr


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master efbaf95 1/5: Remove more XEmacs compat functions from gnus-util.el
Date: Thu, 11 Feb 2016 06:00:25 +0000

branch: master
commit efbaf95619cad8b9dc911c0393a004f225d44cec
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Remove more XEmacs compat functions from gnus-util.el
    
    * lisp/gnus/gnus-util.el (gnus-put-display-table): Remove.
    (gnus-get-display-table): Remove.
    (gnus-format-message): Remove.
---
 lisp/gnus/gnus-agent.el        |    2 +-
 lisp/gnus/gnus-art.el          |    2 +-
 lisp/gnus/gnus-group.el        |    4 ++--
 lisp/gnus/gnus-int.el          |    2 +-
 lisp/gnus/gnus-start.el        |    4 ++--
 lisp/gnus/gnus-sum.el          |   12 ++++++------
 lisp/gnus/gnus-topic.el        |    4 ++--
 lisp/gnus/gnus-util.el         |   26 --------------------------
 lisp/gnus/legacy-gnus-agent.el |    6 +++---
 lisp/gnus/mail-source.el       |    2 +-
 lisp/gnus/message.el           |    6 +++---
 lisp/gnus/mm-decode.el         |    2 +-
 lisp/gnus/mm-uu.el             |    2 +-
 lisp/gnus/mml-smime.el         |    4 ++--
 lisp/gnus/spam-report.el       |    2 +-
 15 files changed, 27 insertions(+), 53 deletions(-)

diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index ae5cfc6..11f93a2 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -837,7 +837,7 @@ be a select method."
                      (not (eq gnus-agent-synchronize-flags 'ask)))
                 (and (eq gnus-agent-synchronize-flags 'ask)
                      (gnus-y-or-n-p
-                      (gnus-format-message
+                      (format-message
                        "Synchronize flags on server `%s'? "
                        (cadr method))))))
     (gnus-agent-synchronize-flags-server method)))
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index c4f6823..9b1215b 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2744,7 +2744,7 @@ summary buffer."
       (cond ((file-directory-p file)
             (when (or (not (eq how 'file))
                       (gnus-y-or-n-p
-                       (gnus-format-message
+                       (format-message
                         "Delete temporary HTML file(s) in directory `%s'? "
                         (file-name-as-directory file))))
               (gnus-delete-directory file)))
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 190acf1..eec7b1c 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2927,7 +2927,7 @@ and NEW-NAME will be prompted for."
            (gnus-info-params info))
           (t info))
      ;; The proper documentation.
-     (gnus-format-message
+     (format-message
       "Editing the %s for `%s'."
       (cond
        ((eq part 'method) "select method")
@@ -3255,7 +3255,7 @@ mail messages or news articles in files that have numeric 
names."
       (error "%s is not an nnimap group" group))
     (unless (setq acl (nnimap-acl-get mailbox (cadr method)))
       (error "Server does not support ACL's"))
-    (gnus-edit-form acl (gnus-format-message "\
+    (gnus-edit-form acl (format-message "\
 Editing the access control list for `%s'.
 
    An access control list is a list of (identifier . rights) elements.
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index d0798d3..38cfa44 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -164,7 +164,7 @@ If CONFIRM is non-nil, the user will be asked for an NNTP 
server."
        (gnus-open-server gnus-select-method)
        gnus-batch-mode
        (gnus-y-or-n-p
-       (gnus-format-message
+       (format-message
         "%s (%s) open error: `%s'.  Continue? "
         (car gnus-select-method) (cadr gnus-select-method)
         (gnus-status-message gnus-select-method)))
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 8669ff4..825c95c 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2388,8 +2388,8 @@ If FORCE is non-nil, the .newsrc file is read."
 
               (funcall func convert-to)))
           (gnus-dribble-enter
-           (gnus-format-message ";Converted gnus from version `%s' to `%s'."
-                               gnus-newsrc-file-version gnus-version)))))))
+           (format-message ";Converted gnus from version `%s' to `%s'."
+                          gnus-newsrc-file-version gnus-version)))))))
 
 (defun gnus-convert-mark-converter-prompt (converter no-prompt)
   "Indicate whether CONVERTER requires gnus-convert-old-newsrc to
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 5eb89b7..683eca1 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3435,13 +3435,13 @@ display only a single character."
        (i 32))
     ;; Nix out all the control chars...
     (while (>= (setq i (1- i)) 0)
-      (gnus-put-display-table i [??] table))
+      (aset table i [??]))
    ;; ... but not newline and cr, of course.  (cr is necessary for the
     ;; selective display).
-    (gnus-put-display-table ?\n nil table)
-    (gnus-put-display-table ?\r nil table)
+    (aset table ?\n nil)
+    (aset table ?\r nil)
     ;; We keep TAB as well.
-    (gnus-put-display-table ?\t nil table)
+    (aset table ?\t nil)
     ;; We nix out any glyphs 127 through 255, or 127 through 159 in
     ;; Emacs 23 (unicode), that are not set already.
     (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
@@ -3449,8 +3449,8 @@ display only a single character."
               256)))
       (while (>= (setq i (1- i)) 127)
        ;; Only modify if the entry is nil.
-       (unless (gnus-get-display-table i table)
-         (gnus-put-display-table i [??] table))))
+       (unless (aref table i)
+         (aset table i [??]))))
     (setq buffer-display-table table)))
 
 (defun gnus-summary-set-article-display-arrow (pos)
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index 1245b96..b471c2a 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -1611,8 +1611,8 @@ If performed on a topic, edit the topic parameters 
instead."
       (let ((topic (gnus-group-topic-name)))
        (gnus-edit-form
         (gnus-topic-parameters topic)
-        (gnus-format-message "Editing the topic parameters for `%s'."
-                             (or group topic))
+        (format-message "Editing the topic parameters for `%s'."
+                        (or group topic))
         `(lambda (form)
            (gnus-topic-set-parameters ,topic form)))))))
 
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 49a0061..52b2df4 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1726,27 +1726,6 @@ empty directories from OLD-PATH."
 (defalias 'gnus-read-shell-command
   (if (fboundp 'read-shell-command) 'read-shell-command 'read-string))
 
-(defmacro gnus-put-display-table (range value display-table)
-  "Set the value for char RANGE to VALUE in DISPLAY-TABLE.  "
-  (if (featurep 'xemacs)
-      (progn
-        `(if (fboundp 'put-display-table)
-          (put-display-table ,range ,value ,display-table)
-          (if (sequencep ,display-table)
-              (aset ,display-table ,range ,value)
-            (put-char-table ,range ,value ,display-table))))
-    `(aset ,display-table ,range ,value)))
-
-(defmacro gnus-get-display-table (character display-table)
-  "Find value for CHARACTER in DISPLAY-TABLE.  "
-  (if (featurep 'xemacs)
-      `(if (fboundp 'get-display-table)
-          (get-display-table ,character ,display-table)
-          (if (sequencep ,display-table)
-              (aref ,display-table ,character)
-            (get-char-table ,character ,display-table)))
-    `(aref ,display-table ,character)))
-
 (declare-function image-size "image.c" (spec &optional pixels frame))
 
 (defun gnus-rescale-image (image size)
@@ -1840,11 +1819,6 @@ to case differences."
               (string-equal (downcase str1) (downcase prefix))
             (string-equal str1 prefix))))))
 
-(defalias 'gnus-format-message
-  (if (fboundp 'format-message) 'format-message
-    ;; for Emacs < 25, and XEmacs, don't worry about quote translation.
-    'format))
-
 ;; Simple check: can be a macro but this way, although slow, it's really clear.
 ;; We don't use `bound-and-true-p' because it's not in XEmacs.
 (defun gnus-bound-and-true-p (sym)
diff --git a/lisp/gnus/legacy-gnus-agent.el b/lisp/gnus/legacy-gnus-agent.el
index 7293e33..a8c61fa 100644
--- a/lisp/gnus/legacy-gnus-agent.el
+++ b/lisp/gnus/legacy-gnus-agent.el
@@ -148,17 +148,17 @@ converted to the compressed format."
             (gnus-pp gnus-agent-expire-days)
 
            (insert
-            (gnus-format-message
+            (format-message
              "\nIn order to use version `%s' of gnus, you will need to set\n"
              converting-to))
             (insert "gnus-agent-expire-days to an integer. If you still wish 
to set different\n")
             (insert "expiration days to individual groups, you must instead 
set the\n")
-            (insert (gnus-format-message
+            (insert (format-message
                     "`agent-days-until-old' group and/or topic parameter.\n"))
             (insert "\n")
             (insert "If you would like, gnus can iterate over every group 
comparing its name to the\n")
             (insert "regular expressions that you currently have in 
gnus-agent-expire-days.  When\n")
-            (insert (gnus-format-message
+            (insert (format-message
                     "gnus finds a match, it will update that group's 
`agent-days-until-old' group\n"))
             (insert "parameter to the value associated with the regular 
expression.\n")
             (insert "\n")
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index f9c89f5..6930616 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -612,7 +612,7 @@ If CONFIRM is non-nil, ask for confirmation before removing 
a file."
        (when (and (> (- currday fileday) diff)
                   (if confirm
                       (y-or-n-p
-                       (gnus-format-message "\
+                       (format-message "\
 Delete old (> %s day(s)) incoming mail file `%s'? " diff bfile))
                     (gnus-message 8 "\
 Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 609c42d..3ed359b 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2188,7 +2188,7 @@ contains a valid encoded word.  Decode again? "
          (unless cs-coding
            (setq cs-coding
                  (mm-read-coding-system
-                  (gnus-format-message "\
+                  (format-message "\
 Decoded Subject \"%s\"
 contains an encoded word.  The charset `%s' is unknown or invalid.
 Hit RET to replace non-decodable characters with \"%s\" or enter replacement
@@ -4459,7 +4459,7 @@ This function could be useful in `message-setup-hook'."
          (dolist (bog (message-bogus-recipient-p addr))
            (and bog
                 (not (y-or-n-p
-                      (gnus-format-message
+                      (format-message
                        "Address `%s'%s might be bogus.  Continue? "
                        bog
                        ;; If the encoded version of the email address
@@ -8482,7 +8482,7 @@ Header and body are separated by `mail-header-separator'."
        (when force
          (sit-for message-send-form-letter-delay))
        (if (or force
-                 (y-or-n-p (gnus-format-message "Send message to `%s'? " to)))
+                 (y-or-n-p (format-message "Send message to `%s'? " to)))
            (progn
              (setq sent (1+ sent))
              (message-send-and-exit))
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 4df653c..810560a 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -860,7 +860,7 @@ external if displayed external."
                                      (concat
                                       "using external program \""
                                       (format method filename) "\"")
-                                   (gnus-format-message
+                                   (format-message
                                     "by calling `%s' on the contents)" method))
                                  "? "))))))
            (if external
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 4197b2a..a5b06b2 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -523,7 +523,7 @@ apply the face `mm-uu-extract'."
        (when (and mml2015-use (null (mml2015-clear-verify-function)))
          (mm-set-handle-multipart-parameter
           mm-security-handle 'gnus-details
-          (gnus-format-message
+          (format-message
            "Clear verification not supported by `%s'.\n" mml2015-use)))
        (mml2015-extract-cleartext-signature))
       (list (mm-make-handle buf mm-uu-text-plain-type)))))
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 248e636..407963f 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -216,7 +216,7 @@ Whether the passphrase is cached at all is controlled by
                                        "")))))
          (if (setq cert (smime-cert-by-dns who))
              (setq result (list 'certfile (buffer-name cert)))
-           (setq bad (gnus-format-message "`%s' not found. " who))))
+           (setq bad (format-message "`%s' not found. " who))))
       (quit))
     result))
 
@@ -235,7 +235,7 @@ Whether the passphrase is cached at all is controlled by
                                        "")))))
          (if (setq cert (smime-cert-by-ldap who))
              (setq result (list 'certfile (buffer-name cert)))
-           (setq bad (gnus-format-message "`%s' not found. " who))))
+           (setq bad (format-message "`%s' not found. " who))))
       (quit))
     result))
 
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 7ebff19..722186e 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -307,7 +307,7 @@ symbol `ask', query before flushing the queue file."
     (if (or (eq keep nil)
            (and (eq keep 'ask)
                 (y-or-n-p
-                 (gnus-format-message
+                 (format-message
                   "Flush requests from `%s'? " (current-buffer)))))
        (progn
          (gnus-message 7 "Flushing request file `%s'"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]