* lisp-mnt is broken
@ 2003-09-26 14:00 David PONCE
2003-09-26 14:19 ` Lute Kamstra
0 siblings, 1 reply; 2+ messages in thread
From: David PONCE @ 2003-09-26 14:00 UTC (permalink / 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: lisp-mnt is broken
2003-09-26 14:00 lisp-mnt is broken David PONCE
@ 2003-09-26 14:19 ` Lute Kamstra
0 siblings, 0 replies; 2+ messages in thread
From: Lute Kamstra @ 2003-09-26 14:19 UTC (permalink / raw)
Cc: emacs-devel
David PONCE <david.ponce@wanadoo.fr> writes:
> Following is a patch that fixed the problem.
Thank you. I proposed rms the exact same patch this morning. (Great
mind think alike. ;-) He'll probably install it soon.
Lute.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-26 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-26 14:00 lisp-mnt is broken David PONCE
2003-09-26 14:19 ` Lute Kamstra
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).