1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-07 15:21:46 +00:00

Remove more XEmacs compat code from Gnus

* lisp/gnus/gnus-util.el (gnus-bound-and-true-p): Remove.
(gnus-timer--function): Remove.

* lisp/gnus/gnus-uu.el (gnus-uu-save-article): Remove XEmacs
19.2 compat.

* lisp/gnus/gnus-win.el: Remove XEmacs compat code.
This commit is contained in:
Lars Ingebrigtsen 2016-02-11 16:55:30 +11:00
parent efbaf95619
commit 00cc327b9d
7 changed files with 13 additions and 42 deletions

View File

@ -4562,7 +4562,7 @@ commands:
(defun gnus-article-stop-animations ()
(dolist (timer (and (boundp 'timer-list)
timer-list))
(when (eq (gnus-timer--function timer) 'image-animate-timeout)
(when (eq (timer--function timer) 'image-animate-timeout)
(cancel-timer timer))))
(defun gnus-stop-downloads ()

View File

@ -1819,16 +1819,6 @@ to case differences."
(string-equal (downcase str1) (downcase prefix))
(string-equal str1 prefix))))))
;; Simple check: can be a macro but this way, although slow, it's really clear.
;; We don't use `bound-and-true-p' because it's not in XEmacs.
(defun gnus-bound-and-true-p (sym)
(and (boundp sym) (symbol-value sym)))
(if (fboundp 'timer--function)
(defalias 'gnus-timer--function 'timer--function)
(defun gnus-timer--function (timer)
(elt timer 5)))
(defun gnus-test-list (list predicate)
"To each element of LIST apply PREDICATE.
Return nil if LIST is no list or is empty or some test returns nil;

View File

@ -876,10 +876,7 @@ When called interactively, prompt for REGEXP."
(with-current-buffer buffer
(save-restriction
(let ((inhibit-read-only t))
(set-text-properties (point-min) (point-max) nil)
;; These two are necessary for XEmacs 19.12 fascism.
(put-text-property (point-min) (point-max) 'invisible nil)
(put-text-property (point-min) (point-max) 'intangible nil))
(set-text-properties (point-min) (point-max) nil))
(when (and message-forward-as-mime
message-forward-show-mml
gnus-uu-digest-buffer)

View File

@ -273,9 +273,7 @@ See the Gnus manual for an explanation of the syntax used.")
(cond
((eq buf (window-buffer (selected-window)))
(set-buffer buf))
((eq t (window-dedicated-p
;; XEmacs version of `window-dedicated-p' requires it.
(selected-window)))
((eq t (window-dedicated-p))
;; If the window is hard-dedicated, we have a problem because
;; we just can't do what we're asked. But signaling an error,
;; like `switch-to-buffer' would do, is not an option because
@ -417,15 +415,11 @@ See the Gnus manual for an explanation of the syntax used.")
(gnus-delete-windows-in-gnusey-frames))
;; Just remove some windows.
(gnus-remove-some-windows)
(if (featurep 'xemacs)
(switch-to-buffer nntp-server-buffer)
(set-buffer nntp-server-buffer)))
(set-buffer nntp-server-buffer))
(select-frame frame)))
(let (gnus-window-frame-focus)
(if (featurep 'xemacs)
(switch-to-buffer nntp-server-buffer)
(set-buffer nntp-server-buffer))
(set-buffer nntp-server-buffer)
(gnus-configure-frame split)
(run-hooks 'gnus-configure-windows-hook)
(when gnus-window-frame-focus
@ -510,9 +504,7 @@ should have point."
lowest-buf buf))))
(when lowest-buf
(pop-to-buffer lowest-buf)
(if (featurep 'xemacs)
(switch-to-buffer nntp-server-buffer)
(set-buffer nntp-server-buffer)))
(set-buffer nntp-server-buffer))
(mapcar (lambda (b) (delete-windows-on b t))
(delq lowest-buf bufs)))))
@ -520,9 +512,6 @@ should have point."
(cond
((fboundp 'frames-on-display-list)
(defalias 'gnus-frames-on-display-list 'frames-on-display-list))
((and (featurep 'xemacs) (fboundp 'frame-device))
(defun gnus-frames-on-display-list ()
(apply 'filtered-frame-list 'identity (list (frame-device nil)))))
(t
(defalias 'gnus-frames-on-display-list 'frame-list))))

View File

@ -2503,16 +2503,11 @@ Disabling the agent may result in noticeable loss of performance."
(function-item gnus-slave-no-server)))
(defcustom gnus-other-frame-parameters nil
"Frame parameters used by `gnus-other-frame' to create a Gnus frame.
This should be an alist for Emacs, or a plist for XEmacs."
"Frame parameters used by `gnus-other-frame' to create a Gnus frame."
:group 'gnus-start
:type (if (featurep 'xemacs)
'(repeat (list :inline t :format "%v"
(symbol :tag "Property")
(sexp :tag "Value")))
'(repeat (cons :format "%v"
(symbol :tag "Parameter")
(sexp :tag "Value")))))
:type '(repeat (cons :format "%v"
(symbol :tag "Parameter")
(sexp :tag "Value"))))
(defcustom gnus-user-agent '(emacs gnus type)
"Which information should be exposed in the User-Agent header.

View File

@ -1787,7 +1787,7 @@ article came from is also searched."
(list (list (gnus-method-to-server
(gnus-find-method-for-group gnus-newsgroup-name)))))
(registry-group (and
(gnus-bound-and-true-p 'gnus-registry-enabled)
(bound-and-true-p gnus-registry-enabled)
(car (gnus-registry-get-id-key
(mail-header-id header) 'group))))
(registry-server
@ -1859,7 +1859,7 @@ article came from is also searched."
(when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir)
(setq gnus-summary-line-format
(or nnir-summary-line-format gnus-summary-line-format))
(when (gnus-bound-and-true-p 'gnus-registry-enabled)
(when (bound-and-true-p gnus-registry-enabled)
(remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t)
(remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t)
(remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)

View File

@ -1635,7 +1635,7 @@ search in raw mode."
(defun nnmairix-determine-original-group-from-registry (mid)
"Try to determine original group for message-id MID from the registry."
(when (gnus-bound-and-true-p 'gnus-registry-enabled)
(when (bound-and-true-p gnus-registry-enabled)
(unless (string-match "^<" mid)
(set mid (concat "<" mid)))
(unless (string-match ">$" mid)