From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.help Subject: Re: Elisp questions... where to ask? Date: Sat, 15 Dec 2007 11:56:01 +0100 Organization: Chalmers University of Technology, Sweden Message-ID: References: <08f8db25-aed0-460c-a990-ebc1ec05b2a3@b1g2000pra.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1197769592 22909 80.91.229.12 (16 Dec 2007 01:46:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Dec 2007 01:46:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 16 02:46:42 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J3iaR-0006AO-Oe for geh-help-gnu-emacs@m.gmane.org; Sun, 16 Dec 2007 02:46:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J3iaH-00005k-EU for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Dec 2007 20:46:25 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!news.glorb.com!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!newsfeed.sunet.se!news01.sunet.se!129.16.222.141.MISMATCH!gide.ita.chalmers.se!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 56 Original-NNTP-Posting-Host: remote1.student.chalmers.se Original-X-Trace: gide.ita.chalmers.se 1197716161 6399 129.16.29.79 (15 Dec 2007 10:56:01 GMT) Original-X-Complaints-To: usenet@gide.ita.chalmers.se Original-NNTP-Posting-Date: Sat, 15 Dec 2007 10:56:01 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:Yip6ko/XTFyLQNH4dZEW5GNFYx0= Original-Xref: shelby.stanford.edu gnu.emacs.help:154671 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50099 Archived-At: Santanu writes: > I wrote the following piece of code in the scratch buffer: > --------------------------------------------------------------------------------- > (define-skeleton test1 > "Prompt for name" > "name:" str ? (test2)) > > (define-skeleton test2 > "Prompt for surname" > "surname:" str) > > (test1) santanu chatterjee > --------------------------------------------------------------------------------- > Now when I run the test1 function, and give "santanu" and > "chatterjee" as the inputs to the two prompts, I get the result > as shown above. But that happens in Emacs 21.x. But in > Emacs 22.x and above, this creates some kind of infinite > recursion, and I am placed in a debug buffer. > > Can you reproduce the same thing in your system? If so, > could you let me know what exactly should be done to make > this run in emacs 22.x and above. I tried to go through the > emacs NEWS for 22.x and I did find some things related to > skeleton.el, but due to my lack of knowledge of elisp, I could > not make out much from it. This seems to be a bug in skeleton. There was a change made to skeleton-proxy-new ;; Return non-nil to tell expand-abbrev that expansion has happened. ;; Otherwise the no-self-insert is ignored. t) but skeleton-internal-1 is not prepared to handle `t' returned from a subskeleton. This seems to do the right thing: *** skeleton.el.~1.51.~ 2007-08-14 19:24:04.000000000 +0200 --- skeleton.el 2007-12-15 11:28:36.000000000 +0100 *************** *** 424,429 **** --- 424,430 ---- (skeleton-internal-list element (car literal)) (setq literal (cdr literal))))) ((null element)) + ((eq t element)) (t (skeleton-internal-1 (eval element) t recursive)))) ;; Maybe belongs into simple.el or elsewhere -- Johan Bockgård