405 |
simply controls the set of characters which may be a part of the name |
simply controls the set of characters which may be a part of the name |
406 |
of a mail alias. The value is set up, buffer-local, when first needed.") |
of a mail alias. The value is set up, buffer-local, when first needed.") |
407 |
|
|
408 |
|
(defun mail-abbrev-make-syntax-table () |
409 |
|
(make-local-variable 'mail-abbrev-syntax-table) |
410 |
|
(unless mail-abbrev-syntax-table |
411 |
|
(let ((tab (copy-syntax-table old-syntax-table)) |
412 |
|
(_ (aref (standard-syntax-table) ?_)) |
413 |
|
(w (aref (standard-syntax-table) ?w))) |
414 |
|
(map-char-table |
415 |
|
(function (lambda (key value) |
416 |
|
(if (equal value _) |
417 |
|
(set-char-table-range tab key w)))) |
418 |
|
tab) |
419 |
|
(modify-syntax-entry ?@ "w" tab) |
420 |
|
(setq mail-abbrev-syntax-table tab)))) |
421 |
|
|
422 |
(defun mail-abbrev-in-expansion-header-p () |
(defun mail-abbrev-in-expansion-header-p () |
423 |
"Whether point is in a mail-address header field." |
"Whether point is in a mail-address header field." |
472 |
;; expand-abbrev, and not as a result of the call to |
;; expand-abbrev, and not as a result of the call to |
473 |
;; expand-abbrev which invoked *us*. |
;; expand-abbrev which invoked *us*. |
474 |
|
|
475 |
(make-local-variable 'mail-abbrev-syntax-table) |
(mail-abbrev-make-syntax-table) |
|
(unless mail-abbrev-syntax-table |
|
|
(let ((tab (copy-syntax-table old-syntax-table)) |
|
|
(_ (aref (standard-syntax-table) ?_)) |
|
|
(w (aref (standard-syntax-table) ?w))) |
|
|
(map-char-table |
|
|
(function (lambda (key value) |
|
|
(if (equal value _) |
|
|
(set-char-table-range tab key w)))) |
|
|
tab) |
|
|
(modify-syntax-entry ?@ "w" tab) |
|
|
(setq mail-abbrev-syntax-table tab))) |
|
476 |
|
|
477 |
;; If the character just typed was non-alpha-symbol-syntax, |
;; If the character just typed was non-alpha-symbol-syntax, |
478 |
;; then don't expand the abbrev now (that is, don't expand |
;; then don't expand the abbrev now (that is, don't expand |