From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.help Subject: About the value of `last-abbrev-text' Date: Fri, 28 Feb 2014 21:05:36 +0800 Organization: The Church of Emacs Message-ID: <8738j3crq7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393641174 19477 80.91.229.3 (1 Mar 2014 02:32:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2014 02:32:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 01 03:33:03 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WJZjb-0000Pp-7I for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Mar 2014 03:33:03 +0100 Original-Received: from localhost ([::1]:53958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJZja-0003C9-J0 for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Feb 2014 21:33:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJY84-0005xM-32 for help-gnu-emacs@gnu.org; Fri, 28 Feb 2014 19:50:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJY7y-0003bG-3X for help-gnu-emacs@gnu.org; Fri, 28 Feb 2014 19:50:12 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:51095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJY7x-0003XT-Tr for help-gnu-emacs@gnu.org; Fri, 28 Feb 2014 19:50:06 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WJY7w-0001Gb-3p for help-gnu-emacs@gnu.org; Sat, 01 Mar 2014 01:50:04 +0100 Original-Received: from 123.114.130.164 ([123.114.130.164]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Mar 2014 01:50:04 +0100 Original-Received: from xfq by 123.114.130.164 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Mar 2014 01:50:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 123.114.130.164 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:EGDaCEb55R7+ISaVg1frSGLCWVw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-Mailman-Approved-At: Fri, 28 Feb 2014 21:32:51 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96233 Archived-At: Hi, I'm twiddling with abbrev.el now. The doc string of `last-abbrev-text' says: The exact text of the last abbrev expanded. It is nil if the abbrev has already been unexpanded. I didn't see the expected value of this variable. Here's my experiment: 1. emacs -Q 2. Evaluate the following expressions: --8<---------------cut here---------------start------------->8--- ;; Clear existing value (clear-abbrev-table global-abbrev-table) (define-abbrev-table 'global-abbrev-table '(("ge" "GNU Emacs"))) ;; Turn on abbrev-mode globally (setq-default abbrev-mode t) --8<---------------cut here---------------end--------------->8--- 3. Type `g e SPC', `GNU Emacs ' appeared; 4. The value of `last-abbrev-text' became `#("ge" 0 2 (fontified t))', but what I expected was "GNU Emacs". FYI I'm using Emacs 24.3.50 (current trunk) on Ubuntu 13.10. I've searched the FAQ/web/archives, but didn't get anything that looked promising. Can anyone point me in the right direction? -- http://www.gnu.org/software/emacs/