changeset 2030:488b2f76d852

[xemacs-hg @ 2004-04-19 08:54:47 by stephent] assorted improvements in ./lisp/ <87llkswdr6.fsf@tleepslib.sk.tsukuba.ac.jp> <87pta4we6g.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Mon, 19 Apr 2004 08:54:50 +0000
parents 7a9919388e87
children d82ed7be1636
files lisp/ChangeLog lisp/files.el lisp/help.el lisp/isearch-mode.el lisp/menubar-items.el lisp/startup.el
diffstat 6 files changed, 60 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Apr 19 08:16:33 2004 +0000
+++ b/lisp/ChangeLog	Mon Apr 19 08:54:50 2004 +0000
@@ -1,3 +1,28 @@
+2004-02-23  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* isearch-mode.el (isearch-abort): Preserve successful search target.
+
+2004-04-19  Stephen J. Turnbull  <turnbull@sk.tsukuba.ac.jp>
+
+	* startup.el (site-start-file):
+	(load-init-file):
+	Improve documentation.
+
+2004-04-18  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* menubar-items.el (default-menubar): Options are saved to custom.el.
+
+2004-04-16  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* help.el (help-register-and-maybe-prune-excess): Trim docstring.
+	Sanity check argument.
+	(with-displaying-temp-buffer): Improve docstring.
+
+2004-04-09  Stephen J. Turnbull  <turnbull@sk.tsukuba.ac.jp>
+
+	* files.el (revert-buffer): Synch to 21.4.  Suggested by
+	Rodney Sparapani <rsparapa@post.its.mcw.edu>.
+
 2004-04-09  Mike Sperber  <mike@xemacs.org>
 
 	* minibuf.el (reset-buffer): Zap the mark of the minibuffer as
--- a/lisp/files.el	Mon Apr 19 08:16:33 2004 +0000
+++ b/lisp/files.el	Mon Apr 19 08:54:50 2004 +0000
@@ -3480,10 +3480,20 @@
 		    ;; The resultant buffer is identical, alter
 		    ;; modtime, update mods and exit
 		    (set-visited-file-modtime)
-		    (after-find-file nil nil t t t))
+		    (after-find-file nil nil t t t)
+		    ;; We preserved modes above so fixup the local
+		    ;; variables manually
+		    (condition-case err
+			(hack-local-variables)
+		      (error (lwarn 'local-variables 'warning
+			       "File local-variables error: %s"
+			       (error-message-string err)))))
 		   (t t))
 	     t)))))
 
+;; #### wouldn't something like `revert-buffer-compare-with-file' be a
+;; better name?
+;; #### why is the argument optional?
 (defun revert-buffer-internal (&optional file-name)
   "Read contents of FILE-NAME into a buffer, and compare to current buffer.
 Return nil if identical, and the new buffer if different."
--- a/lisp/help.el	Mon Apr 19 08:16:33 2004 +0000
+++ b/lisp/help.el	Mon Apr 19 08:54:50 2004 +0000
@@ -461,7 +461,11 @@
   "List of help buffers used by `help-register-and-maybe-prune-excess'")
 
 (defun help-register-and-maybe-prune-excess (newbuf)
-  "Register use of a help buffer and possibly kill any excess ones."
+  "Register help buffer named NEWBUF and possibly kill excess ones."
+  ;; don't let client code pass us bogus NEWBUF---if it gets in the list,
+  ;; help can become unusable
+  (unless (stringp newbuf)
+    (error 'wrong-type-argument "help buffer name must be string" newbuf))
   ;; remove new buffer from list
   (setq help-buffer-list (remove newbuf help-buffer-list))
   ;; maybe kill excess help buffers
@@ -487,7 +491,7 @@
 
 (defvar help-buffer-prefix-string "Help"
   "Initial string to use in constructing help buffer names.
-You should never set this directory, only let-bind it.")
+You should never set this directly, only let-bind it.")
 
 (defun help-buffer-name (name)
   "Return a name for a Help buffer using string NAME for context."
@@ -528,13 +532,18 @@
 (put 'help-window-config 'permanent-local t)
 
 (defmacro with-displaying-temp-buffer (name &rest body)
-  "Form which makes a help buffer with given NAME and evaluates BODY there.
+  "Make a help buffer with given NAME and evaluate BODY, sending stdout there.
 
 Use this function for displaying information in temporary buffers, where the
 user will typically view the information and then exit using
 \\<temp-buffer-mode-map>\\[help-mode-quit].
 
-The buffer is put into the mode specified in `mode-for-temp-buffer'."
+On exit from this form, the buffer is put into the mode specified in
+`mode-for-temp-buffer' and displayed, typically in a popup window.  Ie,
+the buffer is a scratchpad which is displayed all at once in formatted
+form.
+
+N.B. Write to this buffer with functions like `princ', not `insert'."
   `(let* ((winconfig (current-window-configuration))
 	  (was-one-window (one-window-p))
 	  (buffer-name ,name)
--- a/lisp/isearch-mode.el	Mon Apr 19 08:16:33 2004 +0000
+++ b/lisp/isearch-mode.el	Mon Apr 19 08:54:50 2004 +0000
@@ -874,7 +874,7 @@
       ;; and really do quit.
       (progn (goto-char isearch-opoint)
 	     (setq isearch-success nil)
-	     (isearch-done t)   ; exit isearch
+	     (isearch-done)		 ; exit and push target string
 	     (signal 'quit '(isearch)))  ; and pass on quit signal
     ;; If search is failing, or has an incomplete regexp,
     ;; rub out until it is once more successful.
--- a/lisp/menubar-items.el	Mon Apr 19 08:16:33 2004 +0000
+++ b/lisp/menubar-items.el	Mon Apr 19 08:54:50 2004 +0000
@@ -1598,7 +1598,7 @@
 	 (find-file el-file)
 	 (or (eq major-mode 'emacs-lisp-mode)
 	     (emacs-lisp-mode)))]
-      ["%_Save Options to Init File" customize-save-customized]
+      ["%_Save Options to Custom File" customize-save-customized]
       )
 
      ("%_Buffers"
--- a/lisp/startup.el	Mon Apr 19 08:16:33 2004 +0000
+++ b/lisp/startup.el	Mon Apr 19 08:54:50 2004 +0000
@@ -134,13 +134,13 @@
 
 (defvar site-start-file "site-start"
   "File containing site-wide run-time initializations.
-This file is loaded at run-time before `.emacs'.  It
-contains inits that need to be in place for the entire site, but
+It is loaded at run-time before the user's init file (see `user-init-file').
+It contains inits that need to be in place for the entire site, but
 which, due to their higher incidence of change, don't make sense to
-load into XEmacs' dumped image.  Thus, the run-time load order is:
+load into XEmacs's dumped image.  Thus, the run-time load order is:
 
   1. file described in this variable, if non-nil;
-  2. `.emacs';
+  2. the file computed by `find-user-init-file';
   3. `/path/to/xemacs/lisp/default.el'.
 
 Don't use the `site-start.el' file for things some users may not like.
@@ -915,13 +915,16 @@
       ;; Don't you dare turn this off for anyone except yourself.
       (load "default" t t))))
 
+;;; #### move this comment into a docstring.  See site-init-file for some
+;;; description of what it does.  Substitute a pointer to this function in
+;;; site-init-file's docstring.
 ;;; Load user's init file and default ones.
 (defun load-init-file ()
   (run-hooks 'before-init-hook)
 
   ;; Run the site-start library if it exists.  The point of this file is
-  ;; that it is run before .emacs.  There is no point in doing this after
-  ;; .emacs; that is useless.
+  ;; that it is run before the user's init file.  There is no point in
+  ;; doing this after the user's init file; that is useless.
   (when site-start-file
     (load site-start-file t t))