From: Matt Armstrong <matt@lickey.com>
Cc: larsi@gnus.org, zsh@cs.rochester.edu, ding@gnus.org, emacs-devel@gnu.org
Subject: Re: problem whith abbrevs in message-mode
Date: Wed, 30 Jan 2002 11:20:36 -0700 [thread overview]
Message-ID: <873d0ng0p7.fsf@squeaker.lickey.com> (raw)
In-Reply-To: <200201271856.g0RIu1v21410@aztec.santafe.edu> (Richard Stallman's message of "Sun, 27 Jan 2002 11:56:01 -0700 (MST)")
Richard Stallman <rms@gnu.org> writes:
> Mailabbrevs is something different; those abbrevs use a special
> abbrev table.
>
> Message mode ought to use text-mode-abbrev-table for its ordinary
> abbrev table. It should set local-abbrev-table to
> text-mode-abbrev-table.
[Note: I've also sent a copy of this to bug-gnu-emacs@gnu.org]
I attempted to implement this change, but mailabbrev clobbers the
value of local-abbrev-table (and the message mode syntax table).
It turns out that mailabbrev does not restore the previous values of
the syntax-table and local-abbrev-table after it is done. Instead, it
restores the mail-* versions of those variables. Since there is no
mail-mode-abbrev-table variable, it *always* sets local-abbrev-table
to nil. It also always sets the syntax table back to
mail-mode-syntax-table, which is not desirable for message mode.
The offending function is sendmail-pre-abbrev-expand-hook in
mailabbrev.el.
(defun sendmail-pre-abbrev-expand-hook ()
[...]
(if (or (not mail-abbrevs-only)
(eq this-command 'expand-abbrev))
(progn
;; We're not in a mail header where mail aliases should
;; be expanded, then use the normal mail-mode abbrev table
;; (if any) and the normal mail-mode syntax table.
(setq local-abbrev-table (and (boundp 'mail-mode-abbrev-table)
mail-mode-abbrev-table))
(set-syntax-table mail-mode-syntax-table))
[...]
Maybe sendmail-pre-abbrev-expand-hook needs to always restore
local-abbrev-table and the syntax table to whatever they were before
it was called?
--
matt
next prev parent reply other threads:[~2002-01-30 18:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-24 3:29 ShengHuo ZHU
2002-01-24 8:00 ` Richard Stallman
2002-01-24 8:39 ` Harry Putnam
2002-01-25 6:21 ` Richard Stallman
2002-01-26 22:37 ` Lars Magne Ingebrigtsen
2002-01-26 22:39 ` Lars Magne Ingebrigtsen
2002-01-27 18:56 ` Richard Stallman
2002-01-30 18:20 ` Matt Armstrong [this message]
2002-02-03 4:41 ` Richard Stallman
2002-02-07 17:03 ` Matt Armstrong
2002-02-07 17:10 ` Matt Armstrong
2002-02-07 17:24 ` ShengHuo ZHU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873d0ng0p7.fsf@squeaker.lickey.com \
--to=matt@lickey.com \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=zsh@cs.rochester.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).