Commit 955cd0bb authored by Miles Bader's avatar Miles Bader
Browse files

Merge from gnus--rel--5.10

Revision: emacs@sv.gnu.org/emacs--rel--22--patch-281
parent 69955d31
2008-06-18 Aidan Kehoe <kehoea@parhasard.net>
* gnus-util.el (gnus-put-display-table, gnus-get-display-table): New
macros that expand to an `aset'/`aref' call under Emacs, and to a
runtime choice under XEmacs.
* gnus-sum.el (gnus-summary-set-display-table): Use
`gnus-put-display-table', `gnus-get-display-table',
`gnus-set-display-table' for the display table, instead of `aset'.
2008-06-05 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-disassociate-draft): Revert 2008-03-18 change.
......
......@@ -3256,13 +3256,13 @@ display only a single character."
(i 32))
;; Nix out all the control chars...
(while (>= (setq i (1- i)) 0)
(aset table i [??]))
(gnus-put-display-table i [??] table))
;; ... but not newline and cr, of course. (cr is necessary for the
;; selective display).
(aset table ?\n nil)
(aset table ?\r nil)
(gnus-put-display-table ?\n nil table)
(gnus-put-display-table ?\r nil table)
;; We keep TAB as well.
(aset table ?\t nil)
(gnus-put-display-table ?\t nil table)
;; We nix out any glyphs 127 through 255, or 127 through 159 in
;; Emacs 23 (unicode), that are not set already.
(let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
......@@ -3270,8 +3270,8 @@ display only a single character."
256)))
(while (>= (setq i (1- i)) 127)
;; Only modify if the entry is nil.
(unless (aref table i)
(aset table i [??]))))
(unless (gnus-get-display-table i table)
(gnus-put-display-table i [??] table))))
(setq buffer-display-table table)))
(defun gnus-summary-set-article-display-arrow (pos)
......
......@@ -1671,6 +1671,27 @@ is allowed once again. (Immediately, if `inhibit-quit' is nil.)"
;; that intends to handle the quit signal next time.
(eval '(ignore nil))))))
(defmacro gnus-put-display-table (range value display-table)
"Set the value for char RANGE to VALUE in DISPLAY-TABLE. "
(if (featurep 'xemacs)
(progn
`(if (fboundp 'put-display-table)
(put-display-table ,range ,value ,display-table)
(if (sequencep ,display-table)
(aset ,display-table ,range ,value)
(put-char-table ,range ,value ,display-table))))
`(aset ,display-table ,range ,value)))
(defmacro gnus-get-display-table (character display-table)
"Find value for CHARACTER in DISPLAY-TABLE. "
(if (featurep 'xemacs)
`(if (fboundp 'get-display-table)
(get-display-table ,character ,display-table)
(if (sequencep ,display-table)
(aref ,display-table ,character)
(get-char-table ,character ,display-table)))
`(aref ,display-table ,character)))
(provide 'gnus-util)
;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment