]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/gnus-art.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / gnus / gnus-art.el
index 4d8cb802b4803775e8babbe1201d0a0f42ad6b0e..c103e1cbb91f3c2b38777d82557b4994649460c2 100644 (file)
@@ -1009,7 +1009,7 @@ on parts -- for instance, adding Vcard info to a database."
 
 (defcustom gnus-article-date-headers '(combined-lapsed)
   "A list of Date header formats to display.
-Valid formats are `ut' (universal time), `local' (local time
+Valid formats are `ut' (Universal Time), `local' (local time
 zone), `english' (readable English), `lapsed' (elapsed time),
 `combined-lapsed' (both the original date and the elapsed time),
 `original' (the original date header), `iso8601' (ISO8601
@@ -1393,7 +1393,7 @@ predicate.  See Info node `(gnus)Customizing Articles'."
   :type gnus-article-treat-custom)
 (put 'gnus-treat-overstrike 'highlight t)
 
-(defcustom gnus-treat-ansi-sequences (if (locate-library "ansi-color") t)
+(defcustom gnus-treat-ansi-sequences t
   "Treat ANSI SGR control sequences.
 Valid values are nil, t, `head', `first', `last', an integer or a
 predicate.  See Info node `(gnus)Customizing Articles'."
@@ -1610,18 +1610,9 @@ It is a string, such as \"PGP\". If nil, ask user."
   :type 'string
   :group 'mime-security)
 
-(defvar idna-program)
-
-(defcustom gnus-use-idna (and (mm-coding-system-p 'utf-8)
-                             (condition-case nil
-                                 (require 'idna)
-                               (file-error)
-                               (invalid-operation))
-                             idna-program
-                             (executable-find idna-program))
-  "Whether IDNA decoding of headers is used when viewing messages.
-This requires GNU Libidn, and by default only enabled if it is found."
-  :version "22.1"
+(defcustom gnus-use-idna t
+  "Whether IDNA decoding of headers is used when viewing messages."
+  :version "25.2"
   :group 'gnus-article-headers
   :type 'boolean)
 
@@ -2591,8 +2582,6 @@ If PROMPT (the prefix), prompt for a coding system to use."
                           t t nil 1))
          (goto-char (point-min)))))))
 
-(autoload 'idna-to-unicode "idna")
-
 (defun article-decode-idna-rhs ()
   "Decode IDNA strings in RHS in various headers in current buffer.
 The following headers are decoded: From:, To:, Cc:, Reply-To:,
@@ -2610,7 +2599,7 @@ Mail-Reply-To: and Mail-Followup-To:."
                         (save-excursion
                           (and (re-search-backward "^[^ \t]" nil t)
                                (looking-at "From\\|To\\|Cc\\|Reply-To\\|Mail-Reply-To\\|Mail-Followup-To")))
-                        (setq unicode (idna-to-unicode ace))))
+                        (setq unicode (puny-decode-domain ace))))
              (unless (string= ace unicode)
                (replace-match unicode nil nil nil 1)))))))))
 
@@ -3607,7 +3596,7 @@ possible values."
   ;; If the date is seriously mangled, the timezone functions are
   ;; liable to bug out, so we ignore all errors.
   (let* ((now (current-time))
-        (real-time (subtract-time now time))
+        (real-time (time-subtract now time))
         (real-sec (and real-time
                        (+ (* (float (car real-time)) 65536)
                           (cadr real-time))))