summaryrefslogtreecommitdiff
path: root/lisp/saveplace.el
diff options
context:
space:
mode:
authorKarl Fogel <kfogel@red-bean.com>1996-05-08 20:02:29 +0000
committerKarl Fogel <kfogel@red-bean.com>1996-05-08 20:02:29 +0000
commit89a853039a4fdc59df1a68791ed044294f5c4e76 (patch)
tree025370e9ef80396d7b9f3f5f4daff670b8ce94f6 /lisp/saveplace.el
parent016cf69e41101388210a5c1fd40e3a5f064a3f31 (diff)
downloademacs-89a853039a4fdc59df1a68791ed044294f5c4e76.tar.gz
Merged cosmetic differences between FSF version and local copy. In
the future, diffmon will make this unnecessary. (save-place-version): new var; init to 1.4. (save-place-limit): init to nil.
Diffstat (limited to 'lisp/saveplace.el')
-rw-r--r--lisp/saveplace.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 9b9268051ea..6689f9bf698 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -5,7 +5,7 @@
;; Author: Karl Fogel <kfogel@cs.oberlin.edu>
;; Maintainer: FSF
;; Created: July, 1993
-;; Version: 1.2
+;; Version: See variable `save-place-version'.
;; Keywords: bookmarks, placeholders
;; This file is part of GNU Emacs.
@@ -25,8 +25,6 @@
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-;;; Commentary:
-
;; Automatically save place in files, so that visiting them later
;; (even during a different Emacs session) automatically moves point
;; to the saved position, when the file is first found. Uses the
@@ -36,11 +34,13 @@
;; Thanks to Stefan Schoef, who sent a patch with the
;; `save-place-version-control' stuff in it.
-;;; Code:
-
;; this is what I was using during testing:
;; (define-key ctl-x-map "p" 'toggle-save-place)
+(defconst save-place-version "1.4"
+ "The version number of this release of saveplace. This is unrelated
+to the version of Emacs itself, except that they change colinearly.")
+
(defvar save-place-alist nil
"Alist of saved places to go back to when revisiting files.
Each element looks like (FILENAME . POSITION);
@@ -114,8 +114,8 @@ To save places automatically in all files, put this in your `.emacs' file:
(setq save-place-alist (delq cell save-place-alist))))
(if save-place
(setq save-place-alist
- (cons (cons buffer-file-name
- (if (not (eq major-mode 'hexl-mode))
+ (cons (cons buffer-file-name
+ (if (not (eq major-mode 'hexl-mode))
(point)
(1+ (hexl-current-address))))
save-place-alist))))))
@@ -205,8 +205,8 @@ To save places automatically in all files, put this in your `.emacs' file:
(let ((cell (assoc buffer-file-name save-place-alist)))
(if cell
(progn
- (or after-find-file-from-revert-buffer
- (goto-char (cdr cell)))
+ (or after-find-file-from-revert-buffer
+ (goto-char (cdr cell)))
;; and make sure it will be saved again for later
(setq save-place t)))))