mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-20 05:41:29 -07:00
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.
This commit is contained in:
parent
e91b75de10
commit
fd8d344fc9
10 changed files with 27 additions and 107 deletions
|
|
@ -5540,7 +5540,7 @@ If INTERACTIVE, call FUNCTION interactively."
|
|||
window
|
||||
(setq window (selected-window))
|
||||
;; Article may be displayed in the other frame.
|
||||
(gnus-select-frame-set-input-focus
|
||||
(select-frame-set-input-focus
|
||||
(prog1
|
||||
frame
|
||||
(setq frame (selected-frame))))))
|
||||
|
|
@ -5568,7 +5568,7 @@ If INTERACTIVE, call FUNCTION interactively."
|
|||
(get-text-property (point) 'gnus-data))))
|
||||
(set-marker overlay-arrow-position nil)
|
||||
(unless gnus-auto-select-part
|
||||
(gnus-select-frame-set-input-focus frame)
|
||||
(select-frame-set-input-focus frame)
|
||||
(select-window window))))
|
||||
t))
|
||||
(if gnus-inhibit-mime-unbuttonizing
|
||||
|
|
@ -6760,7 +6760,7 @@ not have a face in `gnus-article-boring-faces'."
|
|||
(article 1.0)))))))
|
||||
(gnus-configure-windows 'article))
|
||||
(setq win (get-buffer-window summary-buffer 'visible)))
|
||||
(gnus-select-frame-set-input-focus (window-frame win))
|
||||
(select-frame-set-input-focus (window-frame win))
|
||||
(select-window win))))
|
||||
(setq in-buffer (current-buffer))
|
||||
;; We disable the pick minor mode commands.
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ If DONT-POP is nil, display the buffer after setting it up."
|
|||
(let* ((window (get-buffer-window buff t))
|
||||
(frame (and window (window-frame window))))
|
||||
(if frame
|
||||
(gnus-select-frame-set-input-focus frame)
|
||||
(select-frame-set-input-focus frame)
|
||||
(pop-to-buffer buff t)))
|
||||
(error "The draft %s is under edit" file)))))
|
||||
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ Return a string with image data."
|
|||
|
||||
(defun gnus-html-put-image (data url &optional alt-text)
|
||||
"Put an image with DATA from URL and optional ALT-TEXT."
|
||||
(when (gnus-graphic-display-p)
|
||||
(when (display-graphic-p)
|
||||
(let* ((start (text-property-any (point-min) (point-max)
|
||||
'image-url url))
|
||||
(end (when start
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ not get notifications."
|
|||
(article (nth 2 group-article)))
|
||||
(cond ((string= key "read")
|
||||
(gnus-fetch-group group (list article))
|
||||
(gnus-select-frame-set-input-focus (selected-frame)))
|
||||
(select-frame-set-input-focus (selected-frame)))
|
||||
((string= key "mark-read")
|
||||
(gnus-update-read-articles
|
||||
group
|
||||
|
|
|
|||
|
|
@ -6836,7 +6836,7 @@ Like forward-line, but skip over (and don't count) invisible lines."
|
|||
;; If the following character is currently invisible,
|
||||
;; skip all characters with that same `invisible' property value.
|
||||
(while (invisible-p (point))
|
||||
(goto-char (gnus-next-char-property-change (point))))
|
||||
(goto-char (next-char-property-change (point))))
|
||||
(forward-line 1)
|
||||
(if (eobp)
|
||||
(setq done t)
|
||||
|
|
@ -6846,7 +6846,7 @@ Like forward-line, but skip over (and don't count) invisible lines."
|
|||
(if (bobp) (setq done t)
|
||||
(setq n (1+ n))
|
||||
(while (and (not (bobp)) (invisible-p (1- (point))))
|
||||
(goto-char (gnus-previous-char-property-change (point))))))))
|
||||
(goto-char (previous-char-property-change (point))))))))
|
||||
|
||||
(defun gnus-summary-recenter ()
|
||||
"Center point in the summary window.
|
||||
|
|
|
|||
|
|
@ -850,18 +850,6 @@ Otherwise, return the value."
|
|||
(overlay-get overlay 'face))
|
||||
(overlays-at pos))))))
|
||||
|
||||
;; Note: the optional 2nd argument has a different meaning between
|
||||
;; Emacs and XEmacs.
|
||||
;; (next-char-property-change POSITION &optional LIMIT)
|
||||
;; (next-extent-change POS &optional OBJECT)
|
||||
(defalias 'gnus-next-char-property-change
|
||||
(if (fboundp 'next-extent-change)
|
||||
'next-extent-change 'next-char-property-change))
|
||||
|
||||
(defalias 'gnus-previous-char-property-change
|
||||
(if (fboundp 'previous-extent-change)
|
||||
'previous-extent-change 'previous-char-property-change))
|
||||
|
||||
;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996
|
||||
;; The primary idea here is to try to protect internal data structures
|
||||
;; from becoming corrupted when the user hits C-g, or if a hook or
|
||||
|
|
@ -939,16 +927,8 @@ with potentially long computations."
|
|||
|
||||
;;; Functions for saving to babyl/mail files.
|
||||
|
||||
(eval-when-compile
|
||||
(if (featurep 'xemacs)
|
||||
;; Don't load tm and apel XEmacs packages that provide some
|
||||
;; Emacs emulating functions and variables.
|
||||
(let ((features features))
|
||||
(provide 'tm-view)
|
||||
(unless (fboundp 'set-alist) (defalias 'set-alist 'ignore))
|
||||
(require 'rmail)) ;; It requires tm-view that loads apel.
|
||||
(require 'rmail))
|
||||
(autoload 'rmail-update-summary "rmailsum"))
|
||||
(require 'rmail)
|
||||
(autoload 'rmail-update-summary "rmailsum")
|
||||
|
||||
(defvar mm-text-coding-system)
|
||||
|
||||
|
|
@ -1387,10 +1367,6 @@ is run."
|
|||
"Byte-compile FORM if `gnus-use-byte-compile' is non-nil."
|
||||
(if gnus-use-byte-compile
|
||||
(progn
|
||||
(condition-case nil
|
||||
;; Work around a bug in XEmacs 21.4
|
||||
(require 'byte-optimize)
|
||||
(error))
|
||||
(require 'bytecomp)
|
||||
(defalias 'gnus-byte-compile
|
||||
(lambda (form)
|
||||
|
|
@ -1493,16 +1469,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
|
|||
initial-input history def)
|
||||
"Call standard `completing-read-function'."
|
||||
(let ((completion-styles gnus-completion-styles))
|
||||
(completing-read prompt
|
||||
(if (featurep 'xemacs)
|
||||
;; Old XEmacs (at least 21.4) expect an alist,
|
||||
;; in which the car of each element is a string,
|
||||
;; for collection.
|
||||
(mapcar
|
||||
(lambda (elem)
|
||||
(list (format "%s" (or (car-safe elem) elem))))
|
||||
collection)
|
||||
collection)
|
||||
(completing-read prompt collection
|
||||
nil require-match initial-input history def)))
|
||||
|
||||
(autoload 'ido-completing-read "ido")
|
||||
|
|
@ -1543,11 +1510,6 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
|
|||
(or iswitchb-mode
|
||||
(remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)))))
|
||||
|
||||
(defun gnus-graphic-display-p ()
|
||||
(if (featurep 'xemacs)
|
||||
(device-on-window-system-p)
|
||||
(display-graphic-p)))
|
||||
|
||||
(put 'gnus-parse-without-error 'lisp-indent-function 0)
|
||||
(put 'gnus-parse-without-error 'edebug-form-spec '(body))
|
||||
|
||||
|
|
@ -1628,31 +1590,18 @@ CHOICE is a list of the choice char and help message at IDX."
|
|||
(kill-buffer buf))
|
||||
tchar))
|
||||
|
||||
(if (featurep 'emacs)
|
||||
(defalias 'gnus-select-frame-set-input-focus 'select-frame-set-input-focus)
|
||||
(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.
|
||||
Return nil otherwise."
|
||||
(if (featurep 'xemacs)
|
||||
(device-connection (dfw-device object))
|
||||
(if (or (framep object)
|
||||
(and (windowp object)
|
||||
(setq object (window-frame object))))
|
||||
(let ((display (frame-parameter object 'display)))
|
||||
(if (and (stringp display)
|
||||
;; Exclude invalid display names.
|
||||
(string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'"
|
||||
display))
|
||||
display)))))
|
||||
(if (or (framep object)
|
||||
(and (windowp object)
|
||||
(setq object (window-frame object))))
|
||||
(let ((display (frame-parameter object 'display)))
|
||||
(if (and (stringp display)
|
||||
;; Exclude invalid display names.
|
||||
(string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'"
|
||||
display))
|
||||
display))))
|
||||
|
||||
(defvar tool-bar-mode)
|
||||
|
||||
|
|
@ -1661,9 +1610,7 @@ Return nil otherwise."
|
|||
(when (and (boundp 'tool-bar-mode)
|
||||
tool-bar-mode)
|
||||
(let* ((args nil)
|
||||
(func (cond ((featurep 'xemacs)
|
||||
'ignore)
|
||||
((fboundp 'tool-bar-update)
|
||||
(func (cond ((fboundp 'tool-bar-update)
|
||||
'tool-bar-update)
|
||||
((fboundp 'force-window-update)
|
||||
'force-window-update)
|
||||
|
|
@ -1723,10 +1670,6 @@ predicate on the elements."
|
|||
(push (pop list1) res)))
|
||||
(nconc (nreverse res) list1 list2))))
|
||||
|
||||
(defvar xemacs-codename)
|
||||
(defvar sxemacs-codename)
|
||||
(defvar emacs-program-version)
|
||||
|
||||
(defun gnus-emacs-version ()
|
||||
"Stringified Emacs version."
|
||||
(let* ((lst (if (listp gnus-user-agent)
|
||||
|
|
@ -1737,37 +1680,15 @@ predicate on the elements."
|
|||
((memq 'type lst)
|
||||
(symbol-name system-type))
|
||||
(t nil)))
|
||||
codename emacsname)
|
||||
(cond ((featurep 'sxemacs)
|
||||
(setq emacsname "SXEmacs"
|
||||
codename sxemacs-codename))
|
||||
((featurep 'xemacs)
|
||||
(setq emacsname "XEmacs"
|
||||
codename xemacs-codename))
|
||||
(t
|
||||
(setq emacsname "Emacs")))
|
||||
codename)
|
||||
(cond
|
||||
((not (memq 'emacs lst))
|
||||
nil)
|
||||
((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
|
||||
;; Emacs:
|
||||
(concat "Emacs/" (match-string 1 emacs-version)
|
||||
(if system-v
|
||||
(concat " (" system-v ")")
|
||||
"")))
|
||||
((or (featurep 'sxemacs) (featurep 'xemacs))
|
||||
;; XEmacs or SXEmacs:
|
||||
(concat emacsname "/" emacs-program-version
|
||||
(let (plst)
|
||||
(when (memq 'codename lst)
|
||||
(push codename plst))
|
||||
(when system-v
|
||||
(push system-v plst))
|
||||
(unless (featurep 'mule)
|
||||
(push "no MULE" plst))
|
||||
(when (> (length plst) 0)
|
||||
(concat
|
||||
" (" (mapconcat 'identity (reverse plst) ", ") ")")))))
|
||||
(t emacs-version))))
|
||||
|
||||
(defun gnus-rename-file (old-path new-path &optional trim)
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ See the Gnus manual for an explanation of the syntax used.")
|
|||
(gnus-configure-frame split)
|
||||
(run-hooks 'gnus-configure-windows-hook)
|
||||
(when gnus-window-frame-focus
|
||||
(gnus-select-frame-set-input-focus
|
||||
(select-frame-set-input-focus
|
||||
(window-frame gnus-window-frame-focus)))))))))
|
||||
|
||||
(defun gnus-delete-windows-in-gnusey-frames ()
|
||||
|
|
|
|||
|
|
@ -4382,12 +4382,12 @@ current display is used."
|
|||
(with-current-buffer (window-buffer window)
|
||||
(string-match "\\`gnus-"
|
||||
(symbol-name major-mode))))
|
||||
(gnus-select-frame-set-input-focus
|
||||
(select-frame-set-input-focus
|
||||
(setq gnus-other-frame-object (window-frame window)))
|
||||
(select-window window)
|
||||
(throw 'found t)))
|
||||
'ignore t)))
|
||||
(gnus-select-frame-set-input-focus
|
||||
(select-frame-set-input-focus
|
||||
(setq gnus-other-frame-object
|
||||
(if display
|
||||
(make-frame-on-display display gnus-other-frame-parameters)
|
||||
|
|
|
|||
|
|
@ -1943,7 +1943,6 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
|
|||
(autoload 'gnus-output-to-mail "gnus-util")
|
||||
(autoload 'gnus-output-to-rmail "gnus-util")
|
||||
(autoload 'gnus-request-post "gnus-int")
|
||||
(autoload 'gnus-select-frame-set-input-focus "gnus-util")
|
||||
(autoload 'gnus-server-string "gnus")
|
||||
(autoload 'idna-to-ascii "idna")
|
||||
(autoload 'message-setup-toolbar "messagexmas")
|
||||
|
|
@ -6486,7 +6485,7 @@ moved to the beginning "
|
|||
(if window
|
||||
;; Raise the frame already displaying the message buffer.
|
||||
(progn
|
||||
(gnus-select-frame-set-input-focus (window-frame window))
|
||||
(select-frame-set-input-focus (window-frame window))
|
||||
(select-window window))
|
||||
(funcall (or switch-function #'pop-to-buffer) buffer)
|
||||
(set-buffer buffer))
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ regexp to replace with IMAGE. IMAGE is the name of an image file in
|
|||
"Replace in the region `smiley-regexp-alist' matches with corresponding images.
|
||||
A list of images is returned."
|
||||
(interactive "r")
|
||||
(when (gnus-graphic-display-p)
|
||||
(when (display-graphic-p)
|
||||
(unless smiley-cached-regexp-alist
|
||||
(smiley-update-cache))
|
||||
(save-excursion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue