emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r101585: Remove Emacs 21 stuff.


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101585: Remove Emacs 21 stuff.
Date: Fri, 24 Sep 2010 07:25:37 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101585
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2010-09-24 07:25:37 +0000
message:
  Remove Emacs 21 stuff.
  
  gmm-utils.el (gmm-tool-bar-from-list): Always use tool-bar-local-item and 
tool-bar-local-item-from-menu.
  gnus-agent.el (gnus-agent-make-mode-line-string): Always use 
mode-line-highlight face for Emacs.
  gnus-art.el (toplevel): Don't bind recursive-load-depth-limit while loading 
gnus-sum.elc; don't autoload canlock-verify.
  gnus-art.el (gnus-article-jump-to-part): Use read-number.
  gnus-art.el (gnus-insert-mime-button, gnus-insert-mime-security-button): 
Remove Emacs pre-21 compatible code for help-echo.
  gnus-art.el (gnus-article-next-page-1): No need to adjust the number of lines.
  gnus-art.el (gnus-article-describe-bindings): Always use help-buffer.
  gnus-audio.el (gnus-audio-inline-sound): Comment fix.
  gnus-cus.el (gnus-custom-mode): Comment fix.
  gnus-group.el (gnus-group-update-tool-bar): Comment fix.
  gnus-sum.el (gnus-remove-overlays): Doc fix.
  gnus-util.el (gnus-select-frame-set-input-focus): Remove Emacs 21 compatible 
code.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gmm-utils.el
  lisp/gnus/gnus-agent.el
  lisp/gnus/gnus-art.el
  lisp/gnus/gnus-audio.el
  lisp/gnus/gnus-cus.el
  lisp/gnus/gnus-group.el
  lisp/gnus/gnus-sum.el
  lisp/gnus/gnus-util.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-09-24 02:10:54 +0000
+++ b/lisp/gnus/ChangeLog       2010-09-24 07:25:37 +0000
@@ -1,3 +1,28 @@
+2010-09-24  Katsumi Yamaoka  <address@hidden>
+
+       * gmm-utils.el (gmm-tool-bar-from-list): Always use tool-bar-local-item
+       and tool-bar-local-item-from-menu.
+
+       * gnus-agent.el (gnus-agent-make-mode-line-string): Always use
+       mode-line-highlight face for Emacs.
+
+       * gnus-art.el (toplevel): Don't bind recursive-load-depth-limit while
+       loading gnus-sum.elc; fix comment for canlock-verify.
+       (gnus-article-jump-to-part): Use read-number.
+       (gnus-insert-mime-button, gnus-insert-mime-security-button): Remove
+       Emacs pre-21 compatible code for help-echo.
+       (gnus-article-next-page-1): No need to adjust the number of lines.
+       (gnus-article-describe-bindings): Always use help-buffer.
+
+       * gnus-audio.el (gnus-audio-inline-sound)
+       * gnus-cus.el (gnus-custom-mode)
+       * gnus-group.el (gnus-group-update-tool-bar): Comment fix.
+
+       * gnus-sum.el (gnus-remove-overlays): Doc fix.
+
+       * gnus-util.el (gnus-select-frame-set-input-focus): Remove Emacs 21
+       compatible code.
+
 2010-09-24  Glenn Morris  <address@hidden>
 
        * message.el (message-output): Use gnus-output-to-rmail if a buffer is

=== modified file 'lisp/gnus/gmm-utils.el'
--- a/lisp/gnus/gmm-utils.el    2010-09-02 00:55:51 +0000
+++ b/lisp/gnus/gmm-utils.el    2010-09-24 07:25:37 +0000
@@ -267,27 +267,16 @@
                       ;; (tool-bar-add-item ICON DEF KEY &rest PROPS)
                       (apply 'tool-bar-add-item icon nil nil :enable nil 
props)))
                    ((equal fmap t) ;; Not a menu command
-                    (if (fboundp 'tool-bar-local-item)
-                        (apply 'tool-bar-local-item
-                               icon command
-                               (intern icon) ;; reuse icon or fmap here?
-                               tool-bar-map props)
-                      ;; Emacs 21 compatibility:
-                      (apply 'tool-bar-add-item
-                             icon command
-                             (intern icon)
-                             props)))
+                    (apply 'tool-bar-local-item
+                           icon command
+                           (intern icon) ;; reuse icon or fmap here?
+                           tool-bar-map props))
                    (t ;; A menu command
-                    (if (fboundp 'tool-bar-local-item-from-menu)
-                        (apply 'tool-bar-local-item-from-menu
-                               ;; (apply 'tool-bar-local-item icon def key
-                               ;; tool-bar-map props)
-                               command icon tool-bar-map (symbol-value fmap)
-                               props)
-                      ;; Emacs 21 compatibility:
-                      (apply 'tool-bar-add-item-from-menu
-                             command icon (symbol-value fmap)
-                             props))))
+                    (apply 'tool-bar-local-item-from-menu
+                           ;; (apply 'tool-bar-local-item icon def key
+                           ;; tool-bar-map props)
+                           command icon tool-bar-map (symbol-value fmap)
+                           props)))
              t))
          (if (symbolp icon-list)
              (eval icon-list)

=== modified file 'lisp/gnus/gnus-agent.el'
--- a/lisp/gnus/gnus-agent.el   2010-09-20 00:36:54 +0000
+++ b/lisp/gnus/gnus-agent.el   2010-09-24 07:25:37 +0000
@@ -606,16 +606,13 @@
       (propertize string 'local-map
                  (make-mode-line-mouse-map mouse-button mouse-func)
                  'mouse-face
-                 (cond ((and (featurep 'xemacs)
-                             ;; XEmacs' `facep' only checks for a face
-                             ;; object, not for a face name, so it's useless
-                             ;; to check with `facep'.
-                             (find-face 'modeline))
-                        'modeline)
-                       ((facep 'mode-line-highlight) ;; Emacs 22
-                        'mode-line-highlight)
-                       ((facep 'mode-line) ;; Emacs 21
-                        'mode-line)) )
+                 (if (and (featurep 'xemacs)
+                          ;; XEmacs' `facep' only checks for a face
+                          ;; object, not for a face name, so it's useless
+                          ;; to check with `facep'.
+                          (find-face 'modeline))
+                     'modeline
+                   'mode-line-highlight))
     string))
 
 (defun gnus-agent-toggle-plugged (set-to)

=== modified file 'lisp/gnus/gnus-art.el'
--- a/lisp/gnus/gnus-art.el     2010-09-20 00:36:54 +0000
+++ b/lisp/gnus/gnus-art.el     2010-09-24 07:25:37 +0000
@@ -34,10 +34,7 @@
 (defvar w3m-minor-mode-map)
 
 (require 'gnus)
-;; Avoid the "Recursive load suspected" error in Emacs 21.1.
-(eval-and-compile
-  (let ((recursive-load-depth-limit 100))
-    (require 'gnus-sum)))
+(require 'gnus-sum)
 (require 'gnus-spec)
 (require 'gnus-int)
 (require 'gnus-win)
@@ -4259,7 +4256,7 @@
                  (put-text-property (match-end 0) (point-max)
                                     'face eface)))))))))
 
-(autoload 'canlock-verify "canlock" nil t) ;; for Emacs 21.
+(autoload 'canlock-verify "canlock" nil t) ;; for XEmacs.
 
 (defun article-verify-cancel-lock ()
   "Verify Cancel-Lock header."
@@ -4894,10 +4891,7 @@
   ;; FIXME: why is it necessary?
   (sit-for 0)
   (let ((parts (length gnus-article-mime-handle-alist)))
-    (or n (setq n
-               (string-to-number
-                (read-string ;; Emacs 21 doesn't have `read-number'.
-                 (format "Jump to part (2..%s): " parts)))))
+    (or n (setq n (read-number (format "Jump to part (2..%s): " parts))))
     (unless (and (integerp n) (<= n parts) (>= n 1))
       (setq n
            (progn
@@ -5681,7 +5675,7 @@
      :action 'gnus-widget-press-button
      :button-keymap gnus-mime-button-map
      :help-echo
-     (lambda (widget/window &optional overlay pos)
+     (lambda (widget)
        ;; Needed to properly clear the message due to a bug in
        ;; wid-edit (XEmacs only).
        (if (boundp 'help-echo-owns-message)
@@ -5689,14 +5683,7 @@
        (format
        "%S: %s the MIME part; %S: more options"
        (aref gnus-mouse-2 0)
-       ;; XEmacs will get a single widget arg; Emacs 21 will get
-       ;; window, overlay, position.
-       (if (mm-handle-displayed-p
-            (if overlay
-                (with-current-buffer (gnus-overlay-buffer overlay)
-                  (widget-get (widget-at (gnus-overlay-start overlay))
-                              :mime-handle))
-              (widget-get widget/window :mime-handle)))
+       (if (mm-handle-displayed-p (widget-get widget :mime-handle))
            "hide" "show")
        (aref gnus-down-mouse-3 0))))))
 
@@ -6319,15 +6306,6 @@
                      2)))))))
 
 (defun gnus-article-next-page-1 (lines)
-  (unless (featurep 'xemacs)
-    ;; Protect against the bug that Emacs 21.x hangs up when scrolling up for
-    ;; too many number of lines if `scroll-margin' is set as two or greater.
-    (when (and (numberp lines)
-              (> lines 0)
-              (> scroll-margin 0))
-      (setq lines (min lines
-                      (max 0 (- (count-lines (window-start) (point-max))
-                                scroll-margin))))))
   (condition-case ()
       (let ((scroll-in-place nil))
        (scroll-up lines))
@@ -6581,6 +6559,9 @@
 (defvar gnus-draft-mode)
 ;; Calling help-buffer will autoload help-mode.
 (defvar help-xref-stack-item)
+;; Emacs 22 doesn't load it in the batch mode.
+(eval-when-compile
+  (autoload 'help-buffer "help-mode"))
 
 (defun gnus-article-describe-bindings (&optional prefix)
   "Show a list of all defined keys, and their definitions.
@@ -6631,9 +6612,7 @@
                    (with-current-buffer ,(current-buffer)
                      (gnus-article-describe-bindings prefix)))
                  ,prefix)))
-      (with-current-buffer (if (fboundp 'help-buffer)
-                              (let (help-xref-following) (help-buffer))
-                            "*Help*") ;; Emacs 21
+      (with-current-buffer (let (help-xref-following) (help-buffer))
        (setq help-xref-stack-item item)))))
 
 (defun gnus-article-reply-with-original (&optional wide)
@@ -8702,7 +8681,7 @@
      :action 'gnus-widget-press-button
      :button-keymap gnus-mime-security-button-map
      :help-echo
-     (lambda (widget/window &optional overlay pos)
+     (lambda (widget)
        ;; Needed to properly clear the message due to a bug in
        ;; wid-edit (XEmacs only).
        (when (boundp 'help-echo-owns-message)

=== modified file 'lisp/gnus/gnus-audio.el'
--- a/lisp/gnus/gnus-audio.el   2010-09-02 00:55:51 +0000
+++ b/lisp/gnus/gnus-audio.el   2010-09-24 07:25:37 +0000
@@ -39,7 +39,7 @@
 (defvar gnus-audio-inline-sound
   (or (if (fboundp 'device-sound-enabled-p)
          (device-sound-enabled-p))     ; XEmacs
-      (fboundp 'play-sound))           ; Emacs 21
+      (fboundp 'play-sound))           ; Emacs
   "Non-nil means try to play sounds without using an external program.")
 
 (defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds")

=== modified file 'lisp/gnus/gnus-cus.el'
--- a/lisp/gnus/gnus-cus.el     2010-09-02 00:55:51 +0000
+++ b/lisp/gnus/gnus-cus.el     2010-09-24 07:25:37 +0000
@@ -50,7 +50,7 @@
   (setq major-mode 'gnus-custom-mode
        mode-name "Gnus Customize")
   (use-local-map widget-keymap)
-  ;; Emacs 21 stuff:
+  ;; Emacs stuff:
   (when (and (facep 'custom-button-face)
             (facep 'custom-button-pressed-face))
     (set (make-local-variable 'widget-button-face)

=== modified file 'lisp/gnus/gnus-group.el'
--- a/lisp/gnus/gnus-group.el   2010-09-23 07:59:12 +0000
+++ b/lisp/gnus/gnus-group.el   2010-09-24 07:25:37 +0000
@@ -1515,7 +1515,7 @@
   (and (not (featurep 'xemacs))
        (boundp 'tool-bar-mode)
        tool-bar-mode
-       ;; Using `redraw-frame' (see `gnus-tool-bar-update') in Emacs 21 might
+       ;; Using `redraw-frame' (see `gnus-tool-bar-update') in Emacs might
        ;; be confusing, so maybe we shouldn't call it by default.
        (fboundp 'force-window-update))
   "Force updating the group buffer tool bar."

=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el     2010-09-23 23:14:02 +0000
+++ b/lisp/gnus/gnus-sum.el     2010-09-24 07:25:37 +0000
@@ -11318,7 +11318,7 @@
       (defalias 'gnus-remove-overlays 'remove-overlays)
     (defun gnus-remove-overlays (beg end name val)
       "Clear BEG and END of overlays whose property NAME has value VAL.
-For compatibility with Emacs 21 and XEmacs."
+For compatibility with XEmacs."
       (dolist (ov (gnus-overlays-in beg end))
        (when (eq (gnus-overlay-get ov name) val)
          (gnus-delete-overlay ov))))))

=== modified file 'lisp/gnus/gnus-util.el'
--- a/lisp/gnus/gnus-util.el    2010-09-18 10:02:19 +0000
+++ b/lisp/gnus/gnus-util.el    2010-09-24 07:25:37 +0000
@@ -1661,30 +1661,14 @@
        (kill-buffer buf))
     tchar))
 
-(declare-function x-focus-frame "xfns.c" (frame))
-(declare-function w32-focus-frame "../term/w32-win" (frame))
-
-(defun gnus-select-frame-set-input-focus (frame)
-  "Select FRAME, raise it, and set input focus, if possible."
-  (cond ((featurep 'xemacs)
-        (if (fboundp 'select-frame-set-input-focus)
-            (select-frame-set-input-focus frame)
-          (raise-frame frame)
-          (select-frame frame)
-          (focus-frame frame)))
-       ;; `select-frame-set-input-focus' defined in Emacs 21 will not
-       ;; set the input focus.
-       ((>= emacs-major-version 22)
-        (select-frame-set-input-focus frame))
-       (t
-        (raise-frame frame)
-        (select-frame frame)
-        (cond ((memq window-system '(x ns mac))
-               (x-focus-frame frame))
-              ((eq window-system 'w32)
-               (w32-focus-frame frame)))
-        (when focus-follows-mouse
-          (set-mouse-position frame (1- (frame-width frame)) 0)))))
+(if (fboundp 'select-frame-set-input-focus)
+    (defalias 'gnus-select-frame-set-input-focus 'select-frame-set-input-focus)
+  ;; XEmacs 21.4, SXEmacs
+  (defun gnus-select-frame-set-input-focus (frame)
+    "Select FRAME, raise it, and set input focus, if possible."
+    (raise-frame frame)
+    (select-frame frame)
+    (focus-frame frame)))
 
 (defun gnus-frame-or-window-display-name (object)
   "Given a frame or window, return the associated display name.


reply via email to

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