From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: last-abbrev-location Date: Mon, 23 Feb 2004 22:37:53 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200402240437.i1O4brQ20503@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1077597673 10052 80.91.224.253 (24 Feb 2004 04:41:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2004 04:41:13 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Feb 24 05:41:07 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AvUNX-0000w1-00 for ; Tue, 24 Feb 2004 05:41:07 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AvUNX-000843-00 for ; Tue, 24 Feb 2004 05:41:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvULs-00042C-38 for emacs-devel@quimby.gnus.org; Mon, 23 Feb 2004 23:39:24 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AvULf-00040u-ER for emacs-devel@gnu.org; Mon, 23 Feb 2004 23:39:11 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AvUL7-0003i0-O4 for emacs-devel@gnu.org; Mon, 23 Feb 2004 23:39:10 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvUL6-0003hQ-Uu for emacs-devel@gnu.org; Mon, 23 Feb 2004 23:38:37 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i1O4cXKt011758 for ; Mon, 23 Feb 2004 22:38:33 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i1O4brQ20503; Mon, 23 Feb 2004 22:37:53 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20148 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20148 Unlike `abbrev-start-location', which is a marker, `last-abbrev-location' is just a buffer position, an integer. Is there a reason for this? It seems to cause problems. Do `emacs -q'. Define an abbrev `exp' expanding to `expansion'. In the *scratch* buffer type exp in the following position (no trailing whitespace): ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. exp Then expand exp. Go to the previous line and type 12345: ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. 12345 expansion M-x unexpand-abbrev results in: ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. 1expnsion This does not seem right and I have the impression that if `last-abbrev-location' were a marker instead of an integer, one would get: ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. 12345 exp It would seem from the docstring of `unexpand-abbrev' that it is still supposed to work orrectly after some minor editing of the type described above: Undo the expansion of the last abbrev that expanded. This differs from ordinary undo in that other editing done since then is not undone. Sincerely, Luc.