unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David PONCE <david.ponce@wanadoo.fr>
Subject: lisp-mnt is broken
Date: Fri, 26 Sep 2003 16:00:10 +0200 (CEST)	[thread overview]
Message-ID: <8449825.1064584810732.JavaMail.www@wwinf0302> (raw)

Hi,

Since this change:

2003-09-22  Richard M. Stallman  <rms@gnu.org>

	* 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  <david@dponce.com>

	* 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)

             reply	other threads:[~2003-09-26 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-26 14:00 David PONCE [this message]
2003-09-26 14:19 ` lisp-mnt is broken Lute Kamstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8449825.1064584810732.JavaMail.www@wwinf0302 \
    --to=david.ponce@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).