diff options
| author | Karl Fogel | 1996-05-08 20:02:29 +0000 |
|---|---|---|
| committer | Karl Fogel | 1996-05-08 20:02:29 +0000 |
| commit | cf3a09b2585096657c4e42b89c765ad055a9e3c3 (patch) | |
| tree | 1945bbf59db3c4d1291256031cbdceb7ce68eda2 | |
| parent | fbd98d61b9c076a4dac79fd4fc8886bfdc8fb11b (diff) | |
| download | emacs-cf3a09b2585096657c4e42b89c765ad055a9e3c3.tar.gz emacs-cf3a09b2585096657c4e42b89c765ad055a9e3c3.zip | |
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.
| -rw-r--r-- | lisp/saveplace.el | 18 |
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 @@ | |||
| 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: 1.2 | 8 | ;; Version: See variable `save-place-version'. |
| 9 | ;; Keywords: bookmarks, placeholders | 9 | ;; Keywords: bookmarks, placeholders |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| @@ -25,8 +25,6 @@ | |||
| 25 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 25 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 26 | ;; Boston, MA 02111-1307, USA. | 26 | ;; Boston, MA 02111-1307, USA. |
| 27 | 27 | ||
| 28 | ;;; Commentary: | ||
| 29 | |||
| 30 | ;; Automatically save place in files, so that visiting them later | 28 | ;; Automatically save place in files, so that visiting them later |
| 31 | ;; (even during a different Emacs session) automatically moves point | 29 | ;; (even during a different Emacs session) automatically moves point |
| 32 | ;; to the saved position, when the file is first found. Uses the | 30 | ;; to the saved position, when the file is first found. Uses the |
| @@ -36,11 +34,13 @@ | |||
| 36 | ;; Thanks to Stefan Schoef, who sent a patch with the | 34 | ;; Thanks to Stefan Schoef, who sent a patch with the |
| 37 | ;; `save-place-version-control' stuff in it. | 35 | ;; `save-place-version-control' stuff in it. |
| 38 | 36 | ||
| 39 | ;;; Code: | ||
| 40 | |||
| 41 | ;; this is what I was using during testing: | 37 | ;; this is what I was using during testing: |
| 42 | ;; (define-key ctl-x-map "p" 'toggle-save-place) | 38 | ;; (define-key ctl-x-map "p" 'toggle-save-place) |
| 43 | 39 | ||
| 40 | (defconst save-place-version "1.4" | ||
| 41 | "The version number of this release of saveplace. This is unrelated | ||
| 42 | to the version of Emacs itself, except that they change colinearly.") | ||
| 43 | |||
| 44 | (defvar save-place-alist nil | 44 | (defvar save-place-alist nil |
| 45 | "Alist of saved places to go back to when revisiting files. | 45 | "Alist of saved places to go back to when revisiting files. |
| 46 | Each element looks like (FILENAME . POSITION); | 46 | Each element looks like (FILENAME . POSITION); |
| @@ -114,8 +114,8 @@ To save places automatically in all files, put this in your `.emacs' file: | |||
| 114 | (setq save-place-alist (delq cell save-place-alist)))) | 114 | (setq save-place-alist (delq cell save-place-alist)))) |
| 115 | (if save-place | 115 | (if save-place |
| 116 | (setq save-place-alist | 116 | (setq save-place-alist |
| 117 | (cons (cons buffer-file-name | 117 | (cons (cons buffer-file-name |
| 118 | (if (not (eq major-mode 'hexl-mode)) | 118 | (if (not (eq major-mode 'hexl-mode)) |
| 119 | (point) | 119 | (point) |
| 120 | (1+ (hexl-current-address)))) | 120 | (1+ (hexl-current-address)))) |
| 121 | save-place-alist)))))) | 121 | save-place-alist)))))) |
| @@ -205,8 +205,8 @@ To save places automatically in all files, put this in your `.emacs' file: | |||
| 205 | (let ((cell (assoc buffer-file-name save-place-alist))) | 205 | (let ((cell (assoc buffer-file-name save-place-alist))) |
| 206 | (if cell | 206 | (if cell |
| 207 | (progn | 207 | (progn |
| 208 | (or after-find-file-from-revert-buffer | 208 | (or after-find-file-from-revert-buffer |
| 209 | (goto-char (cdr cell))) | 209 | (goto-char (cdr cell))) |
| 210 | ;; and make sure it will be saved again for later | 210 | ;; and make sure it will be saved again for later |
| 211 | (setq save-place t))))) | 211 | (setq save-place t))))) |
| 212 | 212 | ||