summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-20 20:57:42 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-20 20:57:42 +0000
commit59a6c48a6109bcd1f649e1968c3393351ac84a20 (patch)
treeaa609abd6e8dfee5bff79c6d159f340376de7df7
parent8916bbe92590d00c7f6d6f5a5753838993a47426 (diff)
downloademacs-59a6c48a6109bcd1f649e1968c3393351ac84a20.tar.gz
(mail-abbrev-syntax-table): Rewrite using map-char-table.
-rw-r--r--lisp/mail/mailabbrev.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 4491e097af0..5ff2f3cbaca 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -368,16 +368,17 @@ non-address headers.")
(defvar mail-abbrev-syntax-table
(let* ((tab (copy-syntax-table mail-mode-header-syntax-table))
- (i (1- (length tab)))
(_ (aref (standard-syntax-table) ?_))
(w (aref (standard-syntax-table) ?w)))
- (while (>= i 0)
- (if (equal (aref tab i) _) (aset tab i w))
- (setq i (1- i)))
- tab)
- "The syntax-table used for abbrev-expansion purposes; this is not actually
-made the current syntax table of the buffer, but simply controls the set of
-characters which may be a part of the name of a mail alias.")
+ (map-char-table
+ (function (lambda (key value)
+ (if (equal value _)
+ (set-char-table-range tab key w))))
+ tab))
+ "The syntax-table used for abbrev-expansion purposes.
+This is not actually made the current syntax table of the buffer, but
+simply controls the set of characters which may be a part of the name
+of a mail alias.")
(defun mail-abbrev-in-expansion-header-p ()