diff options
| author | Lute Kamstra | 2003-06-02 10:23:19 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2003-06-02 10:23:19 +0000 |
| commit | ccb78fa385044cdb3ac9d296b7abca0c72a55d0a (patch) | |
| tree | b372528ad0a8973e7160adda2e7d0dc61a199c8b | |
| parent | 8d1203eafba0177bc1f8401f01f52716fa2afbc9 (diff) | |
| download | emacs-ccb78fa385044cdb3ac9d296b7abca0c72a55d0a.tar.gz emacs-ccb78fa385044cdb3ac9d296b7abca0c72a55d0a.zip | |
(lm-synopsis): Use relative filenames correctly. Show the synopsis to
the user when appropriate. Do not kill buffers that were created
outside `lm-synopsis'.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 33 |
2 files changed, 20 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e8943cbaca9..173748a924f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2003-06-02 Lute Kamstra <Lute.Kamstra@cwi.nl> | ||
| 2 | |||
| 3 | * emacs-lisp/lisp-mnt.el (lm-synopsis): Use relative filenames | ||
| 4 | correctly. Show the synopsis to the user when appropriate. Do | ||
| 5 | not kill buffers that were created outside `lm-synopsis'. | ||
| 6 | |||
| 1 | 2003-05-27 David Ponce <david@dponce.com> | 7 | 2003-05-27 David Ponce <david@dponce.com> |
| 2 | 8 | ||
| 3 | * ruler-mode.el | 9 | * ruler-mode.el |
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index dfa12f970f7..d282f452456 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el | |||
| @@ -566,26 +566,21 @@ which do not include a recognizable synopsis." | |||
| 566 | (read-file-name "Synopsis for (file or dir): "))) | 566 | (read-file-name "Synopsis for (file or dir): "))) |
| 567 | 567 | ||
| 568 | (if (and file (file-directory-p file)) | 568 | (if (and file (file-directory-p file)) |
| 569 | (with-temp-buffer | 569 | (with-output-to-temp-buffer "*Synopsis*" |
| 570 | (mapcar | 570 | (set-buffer standard-output) |
| 571 | (lambda (f) | 571 | (dolist (f (directory-files file nil ".*\\.el\\'")) |
| 572 | (if (string-match "\\.el\\'" f) | 572 | (let ((syn (lm-synopsis (expand-file-name f file)))) |
| 573 | (let ((syn (lm-synopsis f))) | 573 | (when (or syn showall) |
| 574 | (if syn | 574 | (insert f ":") |
| 575 | (progn | 575 | (lm-insert-at-column lm-comment-column (or syn "NA") "\n"))))) |
| 576 | (insert f ":") | ||
| 577 | (lm-insert-at-column lm-comment-column syn "\n")) | ||
| 578 | (when showall | ||
| 579 | (insert f ":") | ||
| 580 | (lm-insert-at-column lm-comment-column "NA\n")))))) | ||
| 581 | (directory-files file))) | ||
| 582 | (save-excursion | 576 | (save-excursion |
| 583 | (if file | 577 | (let ((must-kill (and file (not (get-file-buffer file))))) |
| 584 | (find-file file)) | 578 | (when file (find-file file)) |
| 585 | (prog1 | 579 | (prog1 |
| 586 | (lm-summary) | 580 | (if (interactive-p) |
| 587 | (if file | 581 | (message "%s" (lm-summary)) |
| 588 | (kill-buffer (current-buffer))))))) | 582 | (lm-summary)) |
| 583 | (when must-kill (kill-buffer (current-buffer)))))))) | ||
| 589 | 584 | ||
| 590 | (eval-when-compile (defvar report-emacs-bug-address)) | 585 | (eval-when-compile (defvar report-emacs-bug-address)) |
| 591 | 586 | ||