]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/mm-uu.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / gnus / mm-uu.el
index 2fa856cc1ef8c1d59c17b5a4a4df5841bdeaec0a..049890e2e30a4a1b070be1acc9b5ff57e0cb5c91 100644 (file)
@@ -249,14 +249,7 @@ To disable dissecting shar codes, for instance, add
 (defsubst mm-uu-function-2 (entry)
   (nth 5 entry))
 
-;; In Emacs 22, we could use `min-colors' in the face definition.  But Emacs
-;; 21 and XEmacs don't support it.
-(defcustom mm-uu-hide-markers
-  (< 16 (or (and (fboundp 'defined-colors)
-                (length (defined-colors)))
-           (and (fboundp 'device-color-cells)
-                (device-color-cells))
-           0))
+(defcustom mm-uu-hide-markers (< 16 (length (defined-colors)))
   "If non-nil, hide verbatim markers.
 The value should be nil on displays where the face
 `mm-uu-extract' isn't distinguishable to the face `default'."
@@ -297,12 +290,8 @@ If PROPERTIES is non-nil, PROPERTIES are applied to the buffer,
 see `set-text-properties'.  If PROPERTIES equals t, this means to
 apply the face `mm-uu-extract'."
   (let ((obuf (current-buffer))
-        (multi (and (boundp 'enable-multibyte-characters)
-                    enable-multibyte-characters))
-       (coding-system
-         ;; Might not exist in non-MULE XEmacs
-         (when (boundp 'buffer-file-coding-system)
-           buffer-file-coding-system)))
+        (multi enable-multibyte-characters)
+       (coding-system buffer-file-coding-system))
     (with-current-buffer (generate-new-buffer " *mm-uu*")
       (if multi (mm-enable-multibyte) (mm-disable-multibyte))
       (setq buffer-file-coding-system coding-system)
@@ -322,13 +311,13 @@ apply the face `mm-uu-extract'."
   (interactive)
   (if symbol (set-default symbol value))
   (setq mm-uu-beginning-regexp nil)
-  (mapcar (lambda (entry)
-            (if (mm-uu-configure-p (mm-uu-type entry) 'disabled)
+  (mapcar (lambda (mm-uu-entry)
+            (if (mm-uu-configure-p (mm-uu-type mm-uu-entry) 'disabled)
                 nil
               (setq mm-uu-beginning-regexp
                     (concat mm-uu-beginning-regexp
                             (if mm-uu-beginning-regexp "\\|")
-                            (mm-uu-beginning-regexp entry)))))
+                            (mm-uu-beginning-regexp mm-uu-entry)))))
          mm-uu-type-alist))
 
 (mm-uu-configure)
@@ -336,7 +325,7 @@ apply the face `mm-uu-extract'."
 (defvar file-name)
 (defvar start-point)
 (defvar end-point)
-(defvar entry)
+(defvar mm-uu-entry)
 
 (defun mm-uu-uu-filename ()
   (if (looking-at ".+")
@@ -612,10 +601,10 @@ apply the face `mm-uu-extract'."
 
 (defun mm-uu-gpg-key-skip-to-last ()
   (let ((point (point))
-       (end-regexp (mm-uu-end-regexp entry))
-       (beginning-regexp (mm-uu-beginning-regexp entry)))
+       (end-regexp (mm-uu-end-regexp mm-uu-entry))
+       (beginning-regexp (mm-uu-beginning-regexp mm-uu-entry)))
     (when (and end-regexp
-              (not (mm-uu-configure-p (mm-uu-type entry) 'disabled)))
+              (not (mm-uu-configure-p (mm-uu-type mm-uu-entry) 'disabled)))
       (while (re-search-forward end-regexp nil t)
        (skip-chars-forward " \t\n\r")
        (if (looking-at beginning-regexp)