]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/gnus-sum.el
Finish idna->puny changes in last Message patch
[gnu-emacs] / lisp / gnus / gnus-sum.el
index adb9b02c3c7a32d8570db35b2be8ed12f781993a..67b4268dbd98a7cced3d0da00e06009216031849 100644 (file)
@@ -2562,7 +2562,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
          (easy-menu-define
            gnus-article-commands-menu gnus-article-mode-map ""
            (cons "Commands" innards))
-       ;; in Emacs, don't share menu.
+       ;; Don't share the menu.
        (setq gnus-article-commands-menu
              (copy-keymap gnus-summary-article-menu))
        (define-key gnus-article-mode-map [menu-bar commands]
@@ -2938,9 +2938,7 @@ When FORCE, rebuild the tool bar."
             tool-bar-mode
             (or (not gnus-summary-tool-bar-map) force))
     (let* ((load-path
-           (gmm-image-load-path-for-library "gnus"
-                                            "mail/save.xpm"
-                                            nil t))
+           (image-load-path-for-library "gnus" "mail/save.xpm" nil t))
            (image-load-path (cons (car load-path) image-load-path))
           (map (gmm-tool-bar-from-list gnus-summary-tool-bar
                                        gnus-summary-tool-bar-zap-list
@@ -6036,6 +6034,11 @@ If SELECT-ARTICLES, only select those articles from GROUP."
                (setq arts (cdr arts)))
              (setq list (cdr all)))))
 
+       ;; When exiting the group, everything that's previously been
+       ;; unseen is now seen.
+       (when (eq (cdr type) 'seen)
+         (setq list (gnus-range-add list gnus-newsgroup-unseen)))
+
        (when (eq (gnus-article-mark-to-type (cdr type)) 'list)
          (setq list (gnus-compress-sequence (set symbol (sort list '<)) t)))
 
@@ -9804,8 +9807,6 @@ prefix specifies how many places to rotate each letter forward."
   ;; Create buttons and stuff...
   (gnus-treat-article nil))
 
-(declare-function idna-to-unicode "ext:idna" (str))
-
 (defun gnus-summary-idna-message (&optional arg)
   "Decode IDNA encoded domain names in the current articles.
 IDNA encoded domain names looks like `xn--bar'.  If a string
@@ -9815,25 +9816,16 @@ invalid IDNA string (`xn--bar' is invalid).
 You must have GNU Libidn (URL `http://www.gnu.org/software/libidn/')
 installed for this command to work."
   (interactive "P")
-  (if (not (and (mm-coding-system-p 'utf-8)
-               (condition-case nil
-                   (require 'idna)
-                 (file-error)
-                 (invalid-operation))
-               (symbol-value 'idna-program)
-               (executable-find (symbol-value 'idna-program))))
-      (gnus-message
-       5 "GNU Libidn not installed properly (`idn' or `idna.el' missing)")
-    (gnus-summary-select-article)
-    (let ((mail-header-separator ""))
-      (gnus-eval-in-buffer-window gnus-article-buffer
-       (save-restriction
-         (widen)
-         (let ((start (window-start))
-               buffer-read-only)
-           (while (re-search-forward "\\(xn--[-0-9a-z]+\\)" nil t)
-             (replace-match (idna-to-unicode (match-string 1))))
-           (set-window-start (get-buffer-window (current-buffer)) start)))))))
+  (gnus-summary-select-article)
+  (let ((mail-header-separator ""))
+    (gnus-eval-in-buffer-window gnus-article-buffer
+      (save-restriction
+       (widen)
+       (let ((start (window-start))
+             buffer-read-only)
+         (while (re-search-forward "\\(xn--[-0-9a-z]+\\)" nil t)
+           (replace-match (puny-decode-domain (match-string 1))))
+         (set-window-start (get-buffer-window (current-buffer)) start))))))
 
 (defun gnus-summary-morse-message (&optional arg)
   "Morse decode the current article."