aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-11 16:39:23 +1100
committerLars Ingebrigtsen2016-02-11 16:39:23 +1100
commitfd8d344fc9164accd2d69683f8aee32b2a87b647 (patch)
tree8aefac778182b9d10fef1856042b174c6aaf6fb1
parente91b75de10881c1bb8b0f4cc14f35c68563dc356 (diff)
downloademacs-fd8d344fc9164accd2d69683f8aee32b2a87b647.tar.gz
emacs-fd8d344fc9164accd2d69683f8aee32b2a87b647.zip
Remove more XEmacs compat functions from Gnus
* lisp/gnus/gnus-util.el (gnus-next-char-property-change): Remove. (gnus-previous-char-property-change): Remove. (gnus-graphic-display-p): Remove. (gnus-select-frame-set-input-focus): Remove.
-rw-r--r--lisp/gnus/gnus-art.el6
-rw-r--r--lisp/gnus/gnus-draft.el2
-rw-r--r--lisp/gnus/gnus-html.el2
-rw-r--r--lisp/gnus/gnus-notifications.el2
-rw-r--r--lisp/gnus/gnus-sum.el4
-rw-r--r--lisp/gnus/gnus-util.el107
-rw-r--r--lisp/gnus/gnus-win.el2
-rw-r--r--lisp/gnus/gnus.el4
-rw-r--r--lisp/gnus/message.el3
-rw-r--r--lisp/gnus/smiley.el2
10 files changed, 27 insertions, 107 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 12f90bf415c..c4f682396a6 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5540,7 +5540,7 @@ If INTERACTIVE, call FUNCTION interactively."
5540 window 5540 window
5541 (setq window (selected-window)) 5541 (setq window (selected-window))
5542 ;; Article may be displayed in the other frame. 5542 ;; Article may be displayed in the other frame.
5543 (gnus-select-frame-set-input-focus 5543 (select-frame-set-input-focus
5544 (prog1 5544 (prog1
5545 frame 5545 frame
5546 (setq frame (selected-frame)))))) 5546 (setq frame (selected-frame))))))
@@ -5568,7 +5568,7 @@ If INTERACTIVE, call FUNCTION interactively."
5568 (get-text-property (point) 'gnus-data)))) 5568 (get-text-property (point) 'gnus-data))))
5569 (set-marker overlay-arrow-position nil) 5569 (set-marker overlay-arrow-position nil)
5570 (unless gnus-auto-select-part 5570 (unless gnus-auto-select-part
5571 (gnus-select-frame-set-input-focus frame) 5571 (select-frame-set-input-focus frame)
5572 (select-window window)))) 5572 (select-window window))))
5573 t)) 5573 t))
5574 (if gnus-inhibit-mime-unbuttonizing 5574 (if gnus-inhibit-mime-unbuttonizing
@@ -6760,7 +6760,7 @@ not have a face in `gnus-article-boring-faces'."
6760 (article 1.0))))))) 6760 (article 1.0)))))))
6761 (gnus-configure-windows 'article)) 6761 (gnus-configure-windows 'article))
6762 (setq win (get-buffer-window summary-buffer 'visible))) 6762 (setq win (get-buffer-window summary-buffer 'visible)))
6763 (gnus-select-frame-set-input-focus (window-frame win)) 6763 (select-frame-set-input-focus (window-frame win))
6764 (select-window win)))) 6764 (select-window win))))
6765 (setq in-buffer (current-buffer)) 6765 (setq in-buffer (current-buffer))
6766 ;; We disable the pick minor mode commands. 6766 ;; We disable the pick minor mode commands.
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el
index 7a52266544c..f5299bea806 100644
--- a/lisp/gnus/gnus-draft.el
+++ b/lisp/gnus/gnus-draft.el
@@ -317,7 +317,7 @@ If DONT-POP is nil, display the buffer after setting it up."
317 (let* ((window (get-buffer-window buff t)) 317 (let* ((window (get-buffer-window buff t))
318 (frame (and window (window-frame window)))) 318 (frame (and window (window-frame window))))
319 (if frame 319 (if frame
320 (gnus-select-frame-set-input-focus frame) 320 (select-frame-set-input-focus frame)
321 (pop-to-buffer buff t))) 321 (pop-to-buffer buff t)))
322 (error "The draft %s is under edit" file))))) 322 (error "The draft %s is under edit" file)))))
323 323
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 23b8836ac7c..f427610e5e1 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -444,7 +444,7 @@ Return a string with image data."
444 444
445(defun gnus-html-put-image (data url &optional alt-text) 445(defun gnus-html-put-image (data url &optional alt-text)
446 "Put an image with DATA from URL and optional ALT-TEXT." 446 "Put an image with DATA from URL and optional ALT-TEXT."
447 (when (gnus-graphic-display-p) 447 (when (display-graphic-p)
448 (let* ((start (text-property-any (point-min) (point-max) 448 (let* ((start (text-property-any (point-min) (point-max)
449 'image-url url)) 449 'image-url url))
450 (end (when start 450 (end (when start
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el
index 5a116cc0f75..d0b0202788d 100644
--- a/lisp/gnus/gnus-notifications.el
+++ b/lisp/gnus/gnus-notifications.el
@@ -81,7 +81,7 @@ not get notifications."
81 (article (nth 2 group-article))) 81 (article (nth 2 group-article)))
82 (cond ((string= key "read") 82 (cond ((string= key "read")
83 (gnus-fetch-group group (list article)) 83 (gnus-fetch-group group (list article))
84 (gnus-select-frame-set-input-focus (selected-frame))) 84 (select-frame-set-input-focus (selected-frame)))
85 ((string= key "mark-read") 85 ((string= key "mark-read")
86 (gnus-update-read-articles 86 (gnus-update-read-articles
87 group 87 group
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 68f5e5ec244..5eb89b740be 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -6836,7 +6836,7 @@ Like forward-line, but skip over (and don't count) invisible lines."
6836 ;; If the following character is currently invisible, 6836 ;; If the following character is currently invisible,
6837 ;; skip all characters with that same `invisible' property value. 6837 ;; skip all characters with that same `invisible' property value.
6838 (while (invisible-p (point)) 6838 (while (invisible-p (point))
6839 (goto-char (gnus-next-char-property-change (point)))) 6839 (goto-char (next-char-property-change (point))))
6840 (forward-line 1) 6840 (forward-line 1)
6841 (if (eobp) 6841 (if (eobp)
6842 (setq done t) 6842 (setq done t)
@@ -6846,7 +6846,7 @@ Like forward-line, but skip over (and don't count) invisible lines."
6846 (if (bobp) (setq done t) 6846 (if (bobp) (setq done t)
6847 (setq n (1+ n)) 6847 (setq n (1+ n))
6848 (while (and (not (bobp)) (invisible-p (1- (point)))) 6848 (while (and (not (bobp)) (invisible-p (1- (point))))
6849 (goto-char (gnus-previous-char-property-change (point)))))))) 6849 (goto-char (previous-char-property-change (point))))))))
6850 6850
6851(defun gnus-summary-recenter () 6851(defun gnus-summary-recenter ()
6852 "Center point in the summary window. 6852 "Center point in the summary window.
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 5545afd70cd..49a0061c84e 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -850,18 +850,6 @@ Otherwise, return the value."
850 (overlay-get overlay 'face)) 850 (overlay-get overlay 'face))
851 (overlays-at pos)))))) 851 (overlays-at pos))))))
852 852
853;; Note: the optional 2nd argument has a different meaning between
854;; Emacs and XEmacs.
855;; (next-char-property-change POSITION &optional LIMIT)
856;; (next-extent-change POS &optional OBJECT)
857(defalias 'gnus-next-char-property-change
858 (if (fboundp 'next-extent-change)
859 'next-extent-change 'next-char-property-change))
860
861(defalias 'gnus-previous-char-property-change
862 (if (fboundp 'previous-extent-change)
863 'previous-extent-change 'previous-char-property-change))
864
865;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 853;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996
866;; The primary idea here is to try to protect internal data structures 854;; The primary idea here is to try to protect internal data structures
867;; from becoming corrupted when the user hits C-g, or if a hook or 855;; from becoming corrupted when the user hits C-g, or if a hook or
@@ -939,16 +927,8 @@ with potentially long computations."
939 927
940;;; Functions for saving to babyl/mail files. 928;;; Functions for saving to babyl/mail files.
941 929
942(eval-when-compile 930(require 'rmail)
943 (if (featurep 'xemacs) 931(autoload 'rmail-update-summary "rmailsum")
944 ;; Don't load tm and apel XEmacs packages that provide some
945 ;; Emacs emulating functions and variables.
946 (let ((features features))
947 (provide 'tm-view)
948 (unless (fboundp 'set-alist) (defalias 'set-alist 'ignore))
949 (require 'rmail)) ;; It requires tm-view that loads apel.
950 (require 'rmail))
951 (autoload 'rmail-update-summary "rmailsum"))
952 932
953(defvar mm-text-coding-system) 933(defvar mm-text-coding-system)
954 934
@@ -1387,10 +1367,6 @@ is run."
1387 "Byte-compile FORM if `gnus-use-byte-compile' is non-nil." 1367 "Byte-compile FORM if `gnus-use-byte-compile' is non-nil."
1388 (if gnus-use-byte-compile 1368 (if gnus-use-byte-compile
1389 (progn 1369 (progn
1390 (condition-case nil
1391 ;; Work around a bug in XEmacs 21.4
1392 (require 'byte-optimize)
1393 (error))
1394 (require 'bytecomp) 1370 (require 'bytecomp)
1395 (defalias 'gnus-byte-compile 1371 (defalias 'gnus-byte-compile
1396 (lambda (form) 1372 (lambda (form)
@@ -1493,16 +1469,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
1493 initial-input history def) 1469 initial-input history def)
1494 "Call standard `completing-read-function'." 1470 "Call standard `completing-read-function'."
1495 (let ((completion-styles gnus-completion-styles)) 1471 (let ((completion-styles gnus-completion-styles))
1496 (completing-read prompt 1472 (completing-read prompt collection
1497 (if (featurep 'xemacs)
1498 ;; Old XEmacs (at least 21.4) expect an alist,
1499 ;; in which the car of each element is a string,
1500 ;; for collection.
1501 (mapcar
1502 (lambda (elem)
1503 (list (format "%s" (or (car-safe elem) elem))))
1504 collection)
1505 collection)
1506 nil require-match initial-input history def))) 1473 nil require-match initial-input history def)))
1507 1474
1508(autoload 'ido-completing-read "ido") 1475(autoload 'ido-completing-read "ido")
@@ -1543,11 +1510,6 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
1543 (or iswitchb-mode 1510 (or iswitchb-mode
1544 (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))))) 1511 (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)))))
1545 1512
1546(defun gnus-graphic-display-p ()
1547 (if (featurep 'xemacs)
1548 (device-on-window-system-p)
1549 (display-graphic-p)))
1550
1551(put 'gnus-parse-without-error 'lisp-indent-function 0) 1513(put 'gnus-parse-without-error 'lisp-indent-function 0)
1552(put 'gnus-parse-without-error 'edebug-form-spec '(body)) 1514(put 'gnus-parse-without-error 'edebug-form-spec '(body))
1553 1515
@@ -1628,31 +1590,18 @@ CHOICE is a list of the choice char and help message at IDX."
1628 (kill-buffer buf)) 1590 (kill-buffer buf))
1629 tchar)) 1591 tchar))
1630 1592
1631(if (featurep 'emacs)
1632 (defalias 'gnus-select-frame-set-input-focus 'select-frame-set-input-focus)
1633 (if (fboundp 'select-frame-set-input-focus)
1634 (defalias 'gnus-select-frame-set-input-focus 'select-frame-set-input-focus)
1635 ;; XEmacs 21.4, SXEmacs
1636 (defun gnus-select-frame-set-input-focus (frame)
1637 "Select FRAME, raise it, and set input focus, if possible."
1638 (raise-frame frame)
1639 (select-frame frame)
1640 (focus-frame frame))))
1641
1642(defun gnus-frame-or-window-display-name (object) 1593(defun gnus-frame-or-window-display-name (object)
1643 "Given a frame or window, return the associated display name. 1594 "Given a frame or window, return the associated display name.
1644Return nil otherwise." 1595Return nil otherwise."
1645 (if (featurep 'xemacs) 1596 (if (or (framep object)
1646 (device-connection (dfw-device object)) 1597 (and (windowp object)
1647 (if (or (framep object) 1598 (setq object (window-frame object))))
1648 (and (windowp object) 1599 (let ((display (frame-parameter object 'display)))
1649 (setq object (window-frame object)))) 1600 (if (and (stringp display)
1650 (let ((display (frame-parameter object 'display))) 1601 ;; Exclude invalid display names.
1651 (if (and (stringp display) 1602 (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'"
1652 ;; Exclude invalid display names. 1603 display))
1653 (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" 1604 display))))
1654 display))
1655 display)))))
1656 1605
1657(defvar tool-bar-mode) 1606(defvar tool-bar-mode)
1658 1607
@@ -1661,9 +1610,7 @@ Return nil otherwise."
1661 (when (and (boundp 'tool-bar-mode) 1610 (when (and (boundp 'tool-bar-mode)
1662 tool-bar-mode) 1611 tool-bar-mode)
1663 (let* ((args nil) 1612 (let* ((args nil)
1664 (func (cond ((featurep 'xemacs) 1613 (func (cond ((fboundp 'tool-bar-update)
1665 'ignore)
1666 ((fboundp 'tool-bar-update)
1667 'tool-bar-update) 1614 'tool-bar-update)
1668 ((fboundp 'force-window-update) 1615 ((fboundp 'force-window-update)
1669 'force-window-update) 1616 'force-window-update)
@@ -1723,10 +1670,6 @@ predicate on the elements."
1723 (push (pop list1) res))) 1670 (push (pop list1) res)))
1724 (nconc (nreverse res) list1 list2)))) 1671 (nconc (nreverse res) list1 list2))))
1725 1672
1726(defvar xemacs-codename)
1727(defvar sxemacs-codename)
1728(defvar emacs-program-version)
1729
1730(defun gnus-emacs-version () 1673(defun gnus-emacs-version ()
1731 "Stringified Emacs version." 1674 "Stringified Emacs version."
1732 (let* ((lst (if (listp gnus-user-agent) 1675 (let* ((lst (if (listp gnus-user-agent)
@@ -1737,37 +1680,15 @@ predicate on the elements."
1737 ((memq 'type lst) 1680 ((memq 'type lst)
1738 (symbol-name system-type)) 1681 (symbol-name system-type))
1739 (t nil))) 1682 (t nil)))
1740 codename emacsname) 1683 codename)
1741 (cond ((featurep 'sxemacs)
1742 (setq emacsname "SXEmacs"
1743 codename sxemacs-codename))
1744 ((featurep 'xemacs)
1745 (setq emacsname "XEmacs"
1746 codename xemacs-codename))
1747 (t
1748 (setq emacsname "Emacs")))
1749 (cond 1684 (cond
1750 ((not (memq 'emacs lst)) 1685 ((not (memq 'emacs lst))
1751 nil) 1686 nil)
1752 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) 1687 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
1753 ;; Emacs:
1754 (concat "Emacs/" (match-string 1 emacs-version) 1688 (concat "Emacs/" (match-string 1 emacs-version)
1755 (if system-v 1689 (if system-v
1756 (concat " (" system-v ")") 1690 (concat " (" system-v ")")
1757 ""))) 1691 "")))
1758 ((or (featurep 'sxemacs) (featurep 'xemacs))
1759 ;; XEmacs or SXEmacs:
1760 (concat emacsname "/" emacs-program-version
1761 (let (plst)
1762 (when (memq 'codename lst)
1763 (push codename plst))
1764 (when system-v
1765 (push system-v plst))
1766 (unless (featurep 'mule)
1767 (push "no MULE" plst))
1768 (when (> (length plst) 0)
1769 (concat
1770 " (" (mapconcat 'identity (reverse plst) ", ") ")")))))
1771 (t emacs-version)))) 1692 (t emacs-version))))
1772 1693
1773(defun gnus-rename-file (old-path new-path &optional trim) 1694(defun gnus-rename-file (old-path new-path &optional trim)
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index b1498fd7852..2c448aadb4c 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -429,7 +429,7 @@ See the Gnus manual for an explanation of the syntax used.")
429 (gnus-configure-frame split) 429 (gnus-configure-frame split)
430 (run-hooks 'gnus-configure-windows-hook) 430 (run-hooks 'gnus-configure-windows-hook)
431 (when gnus-window-frame-focus 431 (when gnus-window-frame-focus
432 (gnus-select-frame-set-input-focus 432 (select-frame-set-input-focus
433 (window-frame gnus-window-frame-focus))))))))) 433 (window-frame gnus-window-frame-focus)))))))))
434 434
435(defun gnus-delete-windows-in-gnusey-frames () 435(defun gnus-delete-windows-in-gnusey-frames ()
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 3d6b44c8562..661f4839634 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -4382,12 +4382,12 @@ current display is used."
4382 (with-current-buffer (window-buffer window) 4382 (with-current-buffer (window-buffer window)
4383 (string-match "\\`gnus-" 4383 (string-match "\\`gnus-"
4384 (symbol-name major-mode)))) 4384 (symbol-name major-mode))))
4385 (gnus-select-frame-set-input-focus 4385 (select-frame-set-input-focus
4386 (setq gnus-other-frame-object (window-frame window))) 4386 (setq gnus-other-frame-object (window-frame window)))
4387 (select-window window) 4387 (select-window window)
4388 (throw 'found t))) 4388 (throw 'found t)))
4389 'ignore t))) 4389 'ignore t)))
4390 (gnus-select-frame-set-input-focus 4390 (select-frame-set-input-focus
4391 (setq gnus-other-frame-object 4391 (setq gnus-other-frame-object
4392 (if display 4392 (if display
4393 (make-frame-on-display display gnus-other-frame-parameters) 4393 (make-frame-on-display display gnus-other-frame-parameters)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 6621e5a0086..609c42da23e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1943,7 +1943,6 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
1943(autoload 'gnus-output-to-mail "gnus-util") 1943(autoload 'gnus-output-to-mail "gnus-util")
1944(autoload 'gnus-output-to-rmail "gnus-util") 1944(autoload 'gnus-output-to-rmail "gnus-util")
1945(autoload 'gnus-request-post "gnus-int") 1945(autoload 'gnus-request-post "gnus-int")
1946(autoload 'gnus-select-frame-set-input-focus "gnus-util")
1947(autoload 'gnus-server-string "gnus") 1946(autoload 'gnus-server-string "gnus")
1948(autoload 'idna-to-ascii "idna") 1947(autoload 'idna-to-ascii "idna")
1949(autoload 'message-setup-toolbar "messagexmas") 1948(autoload 'message-setup-toolbar "messagexmas")
@@ -6486,7 +6485,7 @@ moved to the beginning "
6486 (if window 6485 (if window
6487 ;; Raise the frame already displaying the message buffer. 6486 ;; Raise the frame already displaying the message buffer.
6488 (progn 6487 (progn
6489 (gnus-select-frame-set-input-focus (window-frame window)) 6488 (select-frame-set-input-focus (window-frame window))
6490 (select-window window)) 6489 (select-window window))
6491 (funcall (or switch-function #'pop-to-buffer) buffer) 6490 (funcall (or switch-function #'pop-to-buffer) buffer)
6492 (set-buffer buffer)) 6491 (set-buffer buffer))
diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el
index 403447f3963..0a9af9ea634 100644
--- a/lisp/gnus/smiley.el
+++ b/lisp/gnus/smiley.el
@@ -179,7 +179,7 @@ regexp to replace with IMAGE. IMAGE is the name of an image file in
179 "Replace in the region `smiley-regexp-alist' matches with corresponding images. 179 "Replace in the region `smiley-regexp-alist' matches with corresponding images.
180A list of images is returned." 180A list of images is returned."
181 (interactive "r") 181 (interactive "r")
182 (when (gnus-graphic-display-p) 182 (when (display-graphic-p)
183 (unless smiley-cached-regexp-alist 183 (unless smiley-cached-regexp-alist
184 (smiley-update-cache)) 184 (smiley-update-cache))
185 (save-excursion 185 (save-excursion