From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel Subject: lisp-mnt is broken Date: Fri, 26 Sep 2003 16:00:10 +0200 (CEST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <8449825.1064584810732.JavaMail.www@wwinf0302> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1064585354 17460 80.91.224.253 (26 Sep 2003 14:09:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 Sep 2003 14:09:14 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Sep 26 16:09:11 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A2tHT-0003H6-00 for ; Fri, 26 Sep 2003 16:09:11 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A2tHS-0006R1-01 for ; Fri, 26 Sep 2003 16:09:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A2tB4-00066R-Sq for emacs-devel@quimby.gnus.org; Fri, 26 Sep 2003 10:02:34 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 1A2tB0-00064u-6r for emacs-devel@gnu.org; Fri, 26 Sep 2003 10:02:30 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 1A2tAx-00064E-TY for emacs-devel@gnu.org; Fri, 26 Sep 2003 10:02:28 -0400 Original-Received: from [193.252.22.28] (helo=mwinf0304.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A2t8m-0005k7-7K for emacs-devel@gnu.org; Fri, 26 Sep 2003 10:00:12 -0400 Original-Received: from wwinf0302 (wwinf0302 [172.22.134.29]) by mwinf0304.wanadoo.fr (SMTP Server) with ESMTP id B6212A803FBF for ; Fri, 26 Sep 2003 16:00:10 +0200 (CEST) Original-To: emacs-devel 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:16671 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16671 Hi, Since this change: 2003-09-22 Richard M. Stallman * emacs-lisp/lisp-mnt.el (lm-with-file): Don't visit the file, just use insert-file-contents in temp buffer. lisp-mnt.el is broken and checkdoc, for example, no more find the first line summary. This is because now, just calling `lm-summary' without argument always return nil. Probably other functions in lisp-mnt are affected too. In fact the previous version of `lm-with-file' used the current buffer by default when it is not passed a file argument. The problem is that the current version does nothing and returns nil the a same case. Following is a patch that fixed the problem. Sincerely, David 2003-09-26 David Ponce * emacs-lisp/lisp-mnt.el (lm-with-file): Fix previous change. That is, use the current buffer by default. Index: lisp/emacs-lisp/lisp-mnt.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/lisp-mnt.el,v retrieving revision 1.42 diff -c -r1.42 lisp-mnt.el *** lisp/emacs-lisp/lisp-mnt.el 22 Sep 2003 15:23:53 -0000 1.42 --- lisp/emacs-lisp/lisp-mnt.el 26 Sep 2003 13:52:11 -0000 *************** *** 297,309 **** (defmacro lm-with-file (file &rest body) "Execute BODY in a buffer containing the contents of FILE. ! If FILE is nil, just return nil." (let ((filesym (make-symbol "file"))) `(let ((,filesym ,file)) ! (when ,filesym ! (with-temp-buffer ! (insert-file-contents ,filesym) ! ,@body))))) (put 'lm-with-file 'lisp-indent-function 1) (put 'lm-with-file 'edebug-form-spec t) --- 297,311 ---- (defmacro lm-with-file (file &rest body) "Execute BODY in a buffer containing the contents of FILE. ! If FILE is nil, use the current buffer." (let ((filesym (make-symbol "file"))) `(let ((,filesym ,file)) ! (if ,filesym ! (with-temp-buffer ! (insert-file-contents ,filesym) ! ,@body) ! (save-excursion ! ,@body))))) (put 'lm-with-file 'lisp-indent-function 1) (put 'lm-with-file 'edebug-form-spec t)