[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some bugs in lm-synopsis in lisp-mnt.el.
From: |
Lute Kamstra |
Subject: |
Some bugs in lm-synopsis in lisp-mnt.el. |
Date: |
Fri, 23 May 2003 15:59:35 +0200 |
User-agent: |
Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) |
Dear people,
The command lm-synopsis in lisp/emacs-lisp/lisp-mnt.el has some
bugs.
1. If lm-synopsis is called with FILE being the current directory, it
outputs the synopsis for the files in the directory to a temporary
buffer. This buffer is discarded before lm-synopsis returns. As a
result, the user does not see the synopsis.
2. If lm-synopsis is called with FILE being a directory and this
directory is not current, then it does not find any files since it
uses filesnames relative to the wrong directory.
3. If lm-synopsis is called on a FILE being visited, it kills the
buffer visiting the file.
4. If lm-synopsis is interactively called on a single FILE or buffer,
it does not show the synopsis to the user.
The patch below fixes these bugs. Shall I commit it?
Lute.
*** lisp/emacs-lisp/lisp-mnt.el.~1.38.~ 2003-05-23 11:39:54.000000000 +0200
--- lisp/emacs-lisp/lisp-mnt.el 2003-05-23 15:36:17.000000000 +0200
***************
*** 566,591 ****
(read-file-name "Synopsis for (file or dir): ")))
(if (and file (file-directory-p file))
! (with-temp-buffer
! (mapcar
! (lambda (f)
! (if (string-match "\\.el\\'" f)
! (let ((syn (lm-synopsis f)))
! (if syn
! (progn
! (insert f ":")
! (lm-insert-at-column lm-comment-column syn "\n"))
! (when showall
! (insert f ":")
! (lm-insert-at-column lm-comment-column "NA\n"))))))
! (directory-files file)))
(save-excursion
! (if file
! (find-file file))
! (prog1
! (lm-summary)
! (if file
! (kill-buffer (current-buffer)))))))
(eval-when-compile (defvar report-emacs-bug-address))
--- 566,586 ----
(read-file-name "Synopsis for (file or dir): ")))
(if (and file (file-directory-p file))
! (with-output-to-temp-buffer "*Synopsis*"
! (set-buffer standard-output)
! (dolist (f (directory-files file nil ".*\\.el\\'"))
! (let ((syn (lm-synopsis (expand-file-name f file))))
! (when (or syn showall)
! (insert f ":")
! (lm-insert-at-column lm-comment-column (or syn "NA") "\n")))))
(save-excursion
! (let ((must-kill (and file (not (get-file-buffer file)))))
! (when file (find-file file))
! (prog1
! (if (interactive-p)
! (message "%s" (lm-summary))
! (lm-summary))
! (when must-kill (kill-buffer (current-buffer))))))))
(eval-when-compile (defvar report-emacs-bug-address))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Some bugs in lm-synopsis in lisp-mnt.el.,
Lute Kamstra <=