summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-util.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-06-17 02:32:59 +0000
committerMiles Bader <miles@gnu.org>2008-06-17 02:32:59 +0000
commitc5c80dbf5f1f6b2486fa3916714d91ffb420536e (patch)
tree9f10006d7de80d3ed956e83e42fe5bb3640e21f2 /lisp/gnus/gnus-util.el
parentabd13ad0d9a48870529a9333761792f9f2be550c (diff)
downloademacs-c5c80dbf5f1f6b2486fa3916714d91ffb420536e.tar.gz
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1244
Diffstat (limited to 'lisp/gnus/gnus-util.el')
-rw-r--r--lisp/gnus/gnus-util.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 110e2e038d1..8d86c36dbe9 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1801,6 +1801,27 @@ is allowed once again. (Immediately, if `inhibit-quit' is nil.)"
(defalias 'gnus-read-shell-command
(if (fboundp 'read-shell-command) 'read-shell-command 'read-string))
+(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