(diary-face, holiday-face): Add dark-background variants.
[bpt/emacs.git] / lisp / ediff-help.el
index 6390b98..0de065f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ediff-help.el --- Code related to the contents of Ediff help buffers
 
-;; Copyright (C) 1996 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.sunysb.edu>
 
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Code:
-
-(require 'ediff-init)
+        
+(provide 'ediff-help)
 
 ;; Compiler pacifier start
 (defvar ediff-multiframe)
-(and noninteractive
-     (eval-when-compile
-       (let ((load-path (cons (expand-file-name ".") load-path)))
-        (load-file "ediff-init.el"))))
+
+(eval-when-compile
+  (let ((load-path (cons (expand-file-name ".") load-path)))
+    (or (featurep 'ediff-init)
+       (load "ediff-init.el" nil nil 'nosuffix))
+    ))
 ;; end pacifier
 
+(require 'ediff-init)
+
 ;; Help messages
 
 (defconst ediff-long-help-message-head
@@ -61,7 +65,7 @@ n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     ~ -rotate buffers|     m -wide display       |
 "
   "Help message usually used for 3-way comparison.
-Normally, not a user option. See `ediff-help-message' for details.")
+Normally, not a user option.  See `ediff-help-message' for details.")
   
 (defconst ediff-long-help-message-compare2
   "
@@ -75,7 +79,7 @@ n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     ~ -swap variants |     m -wide display       |  
 "
   "Help message usually used for 2-way comparison.
-Normally, not a user option. See `ediff-help-message' for details.")
+Normally, not a user option.  See `ediff-help-message' for details.")
   
 (defconst ediff-long-help-message-narrow2
   "
@@ -89,7 +93,7 @@ n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     ~ -swap variants |     m -wide display       |  
 "
   "Help message when comparing windows or regions line-by-line.
-Normally, not a user option. See `ediff-help-message' for details.")
+Normally, not a user option.  See `ediff-help-message' for details.")
   
 (defconst ediff-long-help-message-word-mode
   "
@@ -103,7 +107,7 @@ n,SPC -next diff     |     h -hilighting         | rx -restore buf X's old diff
     ~ -swap variants |     m -wide display       |  
 "
   "Help message when comparing windows or regions word-by-word.
-Normally, not a user option. See `ediff-help-message' for details.")
+Normally, not a user option.  See `ediff-help-message' for details.")
   
 (defconst ediff-long-help-message-merge
   "
@@ -115,37 +119,38 @@ n,SPC -next diff     |     h -hilighting         |  r -restore buf C's old diff
   v/V -scroll up/dn  |     X -read-only in buf X | wx -save buf X              
   </> -scroll lt/rt  |     m -wide display       | wd -save diff output        
     ~ -swap variants |     s -shrink window C    |  / -show ancestor buff      
-                     |     $ -show clashes only  |  & -merge w/new default     
+                     |  $$ -show clashes only    |  & -merge w/new default     
+                     |  $* -skip changed regions |
 "
-  "Help message during merging.
-Normally, not a user option. See `ediff-help-message' for details.")
+  "Help message for merge sessions.
+Normally, not a user option.  See `ediff-help-message' for details.")
 
 ;; The actual long help message.
 (ediff-defvar-local ediff-long-help-message ""
-  "Normally, not a user option. See `ediff-help-message' for details.")
+  "Normally, not a user option.  See `ediff-help-message' for details.")
   
 (defconst ediff-brief-message-string
-  "? -quick help "
+  " ? -quick help "
   "Contents of the brief help message.")
 ;; The actual brief help message
 (ediff-defvar-local ediff-brief-help-message ""
-  "Normally, not a user option. See `ediff-help-message' for details.")
+  "Normally, not a user option.  See `ediff-help-message' for details.")
   
 (ediff-defvar-local ediff-brief-help-message-function nil
   "The brief help message that the user can customize.
 If the user sets this to a parameter-less function, Ediff will use it to
-produce the brief help message. This function must return a string.")
+produce the brief help message.  This function must return a string.")
 (ediff-defvar-local ediff-long-help-message-function nil
   "The long help message that the user can customize.
 See `ediff-brief-help-message-function' for more.")
 
 (defvar ediff-use-long-help-message nil
-  "*If t, Ediff displays a long help message. Short help message otherwise.")
+  "*If t, Ediff displays a long help message.  Short help message otherwise.")
 
 ;; The actual help message.
 (ediff-defvar-local ediff-help-message ""
   "The actual help message.
-Normally, the user shouldn't touch this. However, if you want Ediff to
+Normally, the user shouldn't touch this.  However, if you want Ediff to
 start up with different help messages for different jobs, you can change
 the value of this variable and the variables `ediff-help-message-*' in
 `ediff-startup-hook'.") 
@@ -178,19 +183,18 @@ the value of this variable and the variables `ediff-help-message-*' in
   "Explain Ediff commands in more detail."
   (interactive)
   (ediff-barf-if-not-control-buffer)
-  (let ((ctl-buf (current-buffer))
-       (pos (ediff-event-point last-command-event))
+  (let ((pos (ediff-event-point last-command-event))
        overl cmd)
 
     (if ediff-xemacs-p
        (setq overl (extent-at pos (current-buffer) 'ediff-help-info)
              cmd   (ediff-overlay-get overl 'ediff-help-info))
-      (setq cmd (car (mapcar (function (lambda (elt)
-                                        (overlay-get elt 'ediff-help-info)))
+      (setq cmd (car (mapcar (lambda (elt)
+                              (overlay-get elt 'ediff-help-info))
                             (overlays-at pos)))))
     
     (if (not (stringp cmd))
-       (error "Hmm... I don't see an Ediff command around here..."))
+       (error "Hmm...  I don't see an Ediff command around here..."))
     
     (ediff-documentation "Quick Help Commands")
     
@@ -228,7 +232,8 @@ the value of this variable and the variables `ediff-help-message-*' in
            ((string= cmd "z/q") (re-search-forward "^`z'"))
            ((string= cmd "%") (re-search-forward "^`%'"))
            ((string= cmd "C-l") (re-search-forward "^`C-l'"))
-           ((string= cmd "$") (re-search-forward "^`\\$'"))
+           ((string= cmd "$$") (re-search-forward "^`\\$\\$'"))
+           ((string= cmd "$*") (re-search-forward "^`\\$\\*'"))
            ((string= cmd "/") (re-search-forward "^`/'"))
            ((string= cmd "&") (re-search-forward "^`&'"))
            ((string= cmd "s") (re-search-forward "^`s'"))
@@ -306,6 +311,10 @@ the value of this variable and the variables `ediff-help-message-*' in
                             ediff-brief-help-message))
   (run-hooks 'ediff-display-help-hook))
 
-(provide 'ediff-help)
+;;;###autoload
+(defun ediff-customize ()
+  (interactive)
+  (customize-group "ediff"))
+
 
 ;;; ediff-help.el ends here