aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-05-08 20:37:19 +0000
committerRichard M. Stallman1996-05-08 20:37:19 +0000
commit6f96f4c9e7c8f25e7cc517b561ac741ba6f31018 (patch)
tree7697aeeaa67f92a1ede50a21302c33f1be256c49
parent25e2c3c7784674828dcdc99f16c75c8afc24e9b8 (diff)
downloademacs-6f96f4c9e7c8f25e7cc517b561ac741ba6f31018.tar.gz
emacs-6f96f4c9e7c8f25e7cc517b561ac741ba6f31018.zip
Undo previous change.
Delete the version number entirely; fix up whitespace that was changed before.
-rw-r--r--lisp/saveplace.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 6689f9bf698..364e766dcb0 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -5,7 +5,6 @@
5;; Author: Karl Fogel <kfogel@cs.oberlin.edu> 5;; Author: Karl Fogel <kfogel@cs.oberlin.edu>
6;; Maintainer: FSF 6;; Maintainer: FSF
7;; Created: July, 1993 7;; Created: July, 1993
8;; Version: See variable `save-place-version'.
9;; Keywords: bookmarks, placeholders 8;; Keywords: bookmarks, placeholders
10 9
11;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -25,6 +24,8 @@
25;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26;; Boston, MA 02111-1307, USA. 25;; Boston, MA 02111-1307, USA.
27 26
27;;; Commentary:
28
28;; Automatically save place in files, so that visiting them later 29;; Automatically save place in files, so that visiting them later
29;; (even during a different Emacs session) automatically moves point 30;; (even during a different Emacs session) automatically moves point
30;; to the saved position, when the file is first found. Uses the 31;; to the saved position, when the file is first found. Uses the
@@ -34,13 +35,11 @@
34;; Thanks to Stefan Schoef, who sent a patch with the 35;; Thanks to Stefan Schoef, who sent a patch with the
35;; `save-place-version-control' stuff in it. 36;; `save-place-version-control' stuff in it.
36 37
38;;; Code:
39
37;; this is what I was using during testing: 40;; this is what I was using during testing:
38;; (define-key ctl-x-map "p" 'toggle-save-place) 41;; (define-key ctl-x-map "p" 'toggle-save-place)
39 42
40(defconst save-place-version "1.4"
41 "The version number of this release of saveplace. This is unrelated
42to the version of Emacs itself, except that they change colinearly.")
43
44(defvar save-place-alist nil 43(defvar save-place-alist nil
45 "Alist of saved places to go back to when revisiting files. 44 "Alist of saved places to go back to when revisiting files.
46Each element looks like (FILENAME . POSITION); 45Each element looks like (FILENAME . POSITION);
@@ -114,8 +113,8 @@ To save places automatically in all files, put this in your `.emacs' file:
114 (setq save-place-alist (delq cell save-place-alist)))) 113 (setq save-place-alist (delq cell save-place-alist))))
115 (if save-place 114 (if save-place
116 (setq save-place-alist 115 (setq save-place-alist
117 (cons (cons buffer-file-name 116 (cons (cons buffer-file-name
118 (if (not (eq major-mode 'hexl-mode)) 117 (if (not (eq major-mode 'hexl-mode))
119 (point) 118 (point)
120 (1+ (hexl-current-address)))) 119 (1+ (hexl-current-address))))
121 save-place-alist)))))) 120 save-place-alist))))))
@@ -204,9 +203,9 @@ To save places automatically in all files, put this in your `.emacs' file:
204 (or save-place-loaded (load-save-place-alist-from-file)) 203 (or save-place-loaded (load-save-place-alist-from-file))
205 (let ((cell (assoc buffer-file-name save-place-alist))) 204 (let ((cell (assoc buffer-file-name save-place-alist)))
206 (if cell 205 (if cell
207 (progn 206 (progn
208 (or after-find-file-from-revert-buffer 207 (or after-find-file-from-revert-buffer
209 (goto-char (cdr cell))) 208 (goto-char (cdr cell)))
210 ;; and make sure it will be saved again for later 209 ;; and make sure it will be saved again for later
211 (setq save-place t))))) 210 (setq save-place t)))))
212 211