From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [schierlm@gmx.de: Misleading error message when defining empty keyboard macro and no keyboard macro has been defined yet.] Date: Tue, 17 Jul 2007 11:27:43 +0200 Message-ID: <469C8B8F.6070104@gmx.at> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030402000700060401030404" X-Trace: sea.gmane.org 1184664429 15569 80.91.229.12 (17 Jul 2007 09:27:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2007 09:27:09 +0000 (UTC) Cc: schierlm@gmx.de, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 17 11:27:07 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAjKj-0002fc-1I for ged-emacs-devel@m.gmane.org; Tue, 17 Jul 2007 11:27:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAjKi-00014Q-E3 for ged-emacs-devel@m.gmane.org; Tue, 17 Jul 2007 05:27:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IAjKd-00014K-1d for emacs-devel@gnu.org; Tue, 17 Jul 2007 05:26:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IAjKa-00013o-9u for emacs-devel@gnu.org; Tue, 17 Jul 2007 05:26:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAjKa-00013h-2f for emacs-devel@gnu.org; Tue, 17 Jul 2007 05:26:56 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IAjKZ-0004tY-HR for emacs-devel@gnu.org; Tue, 17 Jul 2007 05:26:55 -0400 Original-Received: (qmail invoked by alias); 17 Jul 2007 09:26:48 -0000 Original-Received: from N885P009.adsl.highway.telekom.at (EHLO [62.47.54.137]) [62.47.54.137] by mail.gmx.net (mp055) with SMTP; 17 Jul 2007 11:26:48 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1//U84SF03/k9/PkoPWJeLC/nLt5RDS4l4V2ezwxs NL3+9hlldh6kE2 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74967 Archived-At: This is a multi-part message in MIME format. --------------030402000700060401030404 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > - - Start emacs with -Q > - - Press and immediately > > Result (in echo area): > Only one keyboard macro defined. > > Huh? In fact, there are only *zero* keyboard macros defined (if you do > not count the empty one that has been ignored). > > Expected result: > Ignore empty macro Michael, could you please test the attached patch? Could you also test whether it has unwanted side-effects? Thanks. --------------030402000700060401030404 Content-Type: text/plain; name="kmacro.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kmacro.patch" *** kmacro.el Wed Jan 17 09:30:52 2007 --- kmacro.el Tue Jul 17 11:25:20 2007 *************** *** 606,613 **** (unless executing-kbd-macro (end-kbd-macro arg #'kmacro-loop-setup-function) (when (and last-kbd-macro (= (length last-kbd-macro) 0)) (message "Ignore empty macro") ! (kmacro-pop-ring)))) ;;;###autoload --- 606,616 ---- (unless executing-kbd-macro (end-kbd-macro arg #'kmacro-loop-setup-function) (when (and last-kbd-macro (= (length last-kbd-macro) 0)) + (setq last-kbd-macro nil) (message "Ignore empty macro") ! ;; Don't call `kmacro-ring-empty-p' to avoid its messages. ! (while (and (null last-kbd-macro) kmacro-ring) ! (kmacro-pop-ring1))))) ;;;###autoload --------------030402000700060401030404 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------030402000700060401030404--