emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lisp-mnt is broken


From: David PONCE
Subject: lisp-mnt is broken
Date: Fri, 26 Sep 2003 16:00:10 +0200 (CEST)

Hi,

Since this change:

2003-09-22  Richard M. Stallman  <address@hidden>

        * 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  <address@hidden>

        * 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 via email to

[Prev in Thread] Current Thread [Next in Thread]