all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* About the value of `last-abbrev-text'
@ 2014-02-28 13:05 Xue Fuqiao
  2014-03-01  9:18 ` Peter Dyballa
  0 siblings, 1 reply; 2+ messages in thread
From: Xue Fuqiao @ 2014-02-28 13:05 UTC (permalink / raw
  To: help-gnu-emacs

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/




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: About the value of `last-abbrev-text'
  2014-02-28 13:05 About the value of `last-abbrev-text' Xue Fuqiao
@ 2014-03-01  9:18 ` Peter Dyballa
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Dyballa @ 2014-03-01  9:18 UTC (permalink / raw
  To: Xue Fuqiao; +Cc: help-gnu-emacs


Am 28.02.2014 um 14:05 schrieb Xue Fuqiao:

> 4. The value of `last-abbrev-text' became `#("ge" 0 2 (fontified t))',
>   but what I expected was "GNU Emacs".

Isn't "ge" the abbreviation? And "GNU Emacs" its expansion?

--
Greetings

  Pete

Bigamy is having one wife too many. Monogamy is the same.
				– Oscar Wilde




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-01  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 13:05 About the value of `last-abbrev-text' Xue Fuqiao
2014-03-01  9:18 ` Peter Dyballa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.