From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/42801 Path: main.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.gnus.general Subject: Re: problem whith abbrevs in message-mode Date: Wed, 30 Jan 2002 11:20:36 -0700 Sender: owner-ding@hpc.uh.edu Message-ID: <873d0ng0p7.fsf@squeaker.lickey.com> References: <2n3d0wo299.fsf@zsh.cs.rochester.edu> <200201240800.g0O806B17062@aztec.santafe.edu> <200201250621.g0P6LGk18813@aztec.santafe.edu> <200201271856.g0RIu1v21410@aztec.santafe.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035177997 14135 80.91.224.250 (21 Oct 2002 05:26:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:26:37 +0000 (UTC) Cc: larsi@gnus.org, zsh@cs.rochester.edu, ding@gnus.org, emacs-devel@gnu.org Return-Path: Original-Received: (qmail 9889 invoked from network); 30 Jan 2002 18:21:47 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 30 Jan 2002 18:21:47 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16VzMM-0006u8-00; Wed, 30 Jan 2002 12:21:26 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 30 Jan 2002 12:21:16 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id MAA23886 for ; Wed, 30 Jan 2002 12:20:47 -0600 (CST) Original-Received: (qmail 9860 invoked by alias); 30 Jan 2002 18:20:45 -0000 Original-Received: (qmail 9853 invoked from network); 30 Jan 2002 18:20:45 -0000 Original-Received: from hank.lickey.com (ident-is-dumb@64.81.100.235) by gnus.org with SMTP; 30 Jan 2002 18:20:45 -0000 Original-Received: from squeaker.lickey.com (squeaker.lickey.com [192.168.100.10]) by hank.lickey.com (Postfix) with ESMTP id 5317EEE3E; Wed, 30 Jan 2002 11:20:42 -0700 (MST) Original-Received: from localhost (localhost [127.0.0.1]) by squeaker.lickey.com (Postfix) with ESMTP id BEE39BF21; Wed, 30 Jan 2002 11:20:40 -0700 (MST) Original-Received: by squeaker.lickey.com (Postfix, from userid 1000) id 32D31BF0C; Wed, 30 Jan 2002 11:20:37 -0700 (MST) Mail-Copies-To: never Original-To: rms@gnu.org Mail-Followup-To: rms@gnu.org, larsi@gnus.org, zsh@cs.rochester.edu, ding@gnus.org, emacs-devel@gnu.org In-Reply-To: <200201271856.g0RIu1v21410@aztec.santafe.edu> (Richard Stallman's message of "Sun, 27 Jan 2002 11:56:01 -0700 (MST)") Original-Lines: 47 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu) X-Virus-Scanned: by AMaViS snapshot-20010714 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:42801 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:42801 Richard Stallman 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