+2007-11-01 Michael Olson <mwolson@gnu.org>
+
+ * textmodes/remember.el (remember-before-remember-hook): Turn into
+ a customizable option.
+ (remember): Document INITIAL argument.
+ (remember-region): Remove autoload cookie. Improve docstring to
+ mention that it is called from the *Remember* buffer, and does not
+ have any functional overlap with the `remember' function.
+ (remember-finalize): Remove autoload cookie. Rename from
+ remember-buffer to emphasize that this does not have any
+ functional overlap with the `remember' function.
+ (remember-destroy): Remove autoload cookie.
+
2007-11-01 Glenn Morris <rgm@gnu.org>
* doc-view.el (doc-view-cache-directory): Remove superfluous concat.
"Current annotation.")
(defvar remember-initial-contents nil
"Initial contents to place into *Remember* buffer.")
-(defvar remember-before-remember-hook nil
- "Functions run before switching to the *Remember* buffer.")
+
+(defcustom remember-before-remember-hook nil
+ "Functions run before switching to the *Remember* buffer."
+ :type 'hook
+ :group 'remember)
(defcustom remember-run-all-annotation-functions-flag nil
"Non-nil means use all annotations returned by
;;;###autoload
(defun remember (&optional initial)
"Remember an arbitrary piece of data.
-With a prefix, uses the region as INITIAL."
+INITIAL is the text to initially place in the *Remember* buffer,
+or nil to bring up a blank *Remember* buffer.
+
+With a prefix, use the region as INITIAL."
(interactive
(list (when current-prefix-arg
(buffer-substring (point) (mark)))))
(when remember-save-after-remembering (save-buffer))))
(append-to-file (point-min) (point-max) remember-data-file)))))
-;;;###autoload
(defun remember-region (&optional beg end)
"Remember the data from BEG to END.
-If called from within the remember buffer, BEG and END are ignored,
-and the entire buffer will be remembered.
+It is called from within the *Remember* buffer to save the text
+that was entered,
+
+If BEG and END are nil, the entire buffer will be remembered.
-This function is meant to be called from the *Remember* buffer.
If you want to remember a region, supply a universal prefix to
-`remember' instead. For example: C-u M-x remember."
+`remember' instead. For example: C-u M-x remember RET."
;; Sacha: I have no idea where remember.el gets this context information, but
;; you can just use remember-annotation-functions.
(interactive)
(interactive)
(remember (current-kill 0)))
-;;;###autoload
-(defun remember-buffer ()
+(defun remember-finalize ()
"Remember the contents of the current buffer."
(interactive)
(remember-region (point-min) (point-max)))
-;;;###autoload
(defun remember-destroy ()
"Destroy the current *Remember* buffer."
(interactive)
"Keymap used in Remember mode.")
(when (not remember-mode-map)
(setq remember-mode-map (make-sparse-keymap))
- (define-key remember-mode-map "\C-x\C-s" 'remember-buffer)
- (define-key remember-mode-map "\C-c\C-c" 'remember-buffer)
+ (define-key remember-mode-map "\C-x\C-s" 'remember-finalize)
+ (define-key remember-mode-map "\C-c\C-c" 'remember-finalize)
(define-key remember-mode-map "\C-c\C-k" 'remember-destroy))
(defun remember-mode ()