summaryrefslogtreecommitdiff
path: root/lisp/textmodes/remember.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-02-19 00:34:45 -0800
committerGlenn Morris <rgm@gnu.org>2014-02-19 00:34:45 -0800
commit95160c901a9bc780f30982002b9fcded5b436308 (patch)
tree66a2cf9041f19d4e00e74b1e134d10baf90ffed3 /lisp/textmodes/remember.el
parent6cdb34f31fcccb19e0a9e5f2853c1d5fffc87a11 (diff)
downloademacs-95160c901a9bc780f30982002b9fcded5b436308.tar.gz
Some remember doc
* doc/misc/remember.texi: Copyedits. (Quick Start): No need for manual autoloads. Mention remember-notes. (Function Reference): Update arguments. Add new commands. * lisp/textmodes/remember.el: Set maintainer to emacs-devel according to remember.texi. Move provide statement to end. (remember-mode-map, remember-notes-mode-map, remember-notes-mode) (remember-notes): Doc fixes.
Diffstat (limited to 'lisp/textmodes/remember.el')
-rw-r--r--lisp/textmodes/remember.el59
1 files changed, 31 insertions, 28 deletions
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index a9eb7ad4ec8..089f5b2d889 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -3,6 +3,7 @@
;; Copyright (C) 1999-2001, 2003-2014 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
;; Created: 29 Mar 1999
;; Version: 2.0
;; Keywords: data memory todo pim
@@ -178,8 +179,6 @@
;;; Code:
-(provide 'remember)
-
(defconst remember-version "2.0"
"This version of remember.")
@@ -230,6 +229,8 @@ recorded somewhere by that function."
:type 'boolean
:group 'remember)
+;; See below for more user variables.
+
;;; Internal Variables:
(defvar remember-buffer "*Remember*"
@@ -553,7 +554,7 @@ If this is nil, then `diary-file' will be used instead."
(define-key map "\C-c\C-c" 'remember-finalize)
(define-key map "\C-c\C-k" 'remember-destroy)
map)
- "Keymap used in Remember mode.")
+ "Keymap used in `remember-mode'.")
(define-derived-mode remember-mode indented-text-mode "Remember"
"Major mode for output from \\[remember].
@@ -599,10 +600,14 @@ If this is nil, use `initial-major-mode'."
(let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-c" 'remember-notes-save-and-bury-buffer)
map)
- "Keymap used in remember-notes mode.")
+ "Keymap used in `remember-notes-mode'.")
(define-minor-mode remember-notes-mode
- "Minor mode for the `remember-notes' buffer."
+ "Minor mode for the `remember-notes' buffer.
+This sets `buffer-save-without-query' so that `save-some-buffers' will
+save the notes buffer without asking.
+
+\\{remember-notes-mode-map}"
nil nil nil
(cond
(remember-notes-mode
@@ -612,29 +617,25 @@ If this is nil, use `initial-major-mode'."
;;;###autoload
(defun remember-notes (&optional switch-to)
- "Creates notes buffer and switches to it if called interactively.
-
-If a notes buffer created by a previous invocation of this
-function already exist, it will be returned. Otherwise a new
-buffer will be created whose content will be read from file
-pointed by `remember-data-file'. If a buffer visiting this file
-already exist, that buffer will be used instead of creating a new
-one (see `find-file-noselect' function for more details).
-
-Name of the created buffer is taken from `remember-notes-buffer-name'
-variable and if a buffer with that name already exist (but was not
-created by this function), it will be first killed.
-\\<remember-notes-mode-map>
-`remember-notes-mode' is active in the notes buffer which by default
-contains only one \\[save-and-bury-buffer] binding which saves and
-buries the buffer.
-
-Function returns notes buffer. When called interactively,
-switches to it as well.
-
-Notes buffer is meant for keeping random notes which you'd like to
-preserve across Emacs restarts. The notes will be stored in the
-`remember-data-file'."
+ "Return the notes buffer, creating it if needed, and maybe switch to it.
+This buffer is for notes that you want to preserve across Emacs sessions.
+The notes are saved in `remember-data-file'.
+
+If a buffer is already visiting that file, just return it.
+
+Otherwise, create the buffer, and rename it to `remember-notes-buffer-name',
+unless a buffer of that name already exists. Set the major mode according
+to `remember-notes-initial-major-mode', and enable `remember-notes-mode'
+minor mode.
+
+Use \\<remember-notes-mode-map>\\[remember-notes-save-and-bury-buffer] to save and bury the notes buffer.
+
+Interactively, or if SWITCH-TO is non-nil, switch to the buffer.
+Return the buffer.
+
+Set `initial-buffer-choice' to `remember-notes' to visit your notes buffer
+when Emacs starts. Set `remember-notes-buffer-name' to \"*scratch*\"
+to turn the *scratch* buffer into your notes buffer."
(interactive "p")
(let ((buf (or (find-buffer-visiting remember-data-file)
(with-current-buffer (find-file-noselect remember-data-file)
@@ -662,4 +663,6 @@ is non-nil, bury it and return nil; otherwise return t."
nil)
t))
+(provide 'remember)
+
;;; remember.el ends here