diff options
| author | Tassilo Horn | 2012-03-04 17:56:21 +0100 |
|---|---|---|
| committer | Tassilo Horn | 2012-03-04 17:56:21 +0100 |
| commit | 5dd11cfee60be557274ea95289d2d39972c37a9b (patch) | |
| tree | cefb65cb923830bcf33f5de9dbd962a8057f54ca /lisp | |
| parent | c349f4e6ff1aaa8ef11f051d7b32952e705e09d9 (diff) | |
| download | emacs-5dd11cfee60be557274ea95289d2d39972c37a9b.tar.gz emacs-5dd11cfee60be557274ea95289d2d39972c37a9b.zip | |
* saveplace.el (save-place-to-alist)
(save-place-ignore-files-regexp): Allow value nil to disable this
feature.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/saveplace.el | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12488b0cd52..26d2c1746a2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-03-04 Tassilo Horn <tassilo@member.fsf.org> | ||
| 2 | |||
| 3 | * saveplace.el (save-place-to-alist) | ||
| 4 | (save-place-ignore-files-regexp): Allow value nil to disable this | ||
| 5 | feature. | ||
| 6 | |||
| 1 | 2012-03-04 Chong Yidong <cyd@gnu.org> | 7 | 2012-03-04 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * faces.el (face-spec-reset-face): For the default face, reset the | 9 | * faces.el (face-spec-reset-face): For the default face, reset the |
diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 9c3ce077b7a..43dad63a140 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el | |||
| @@ -132,9 +132,10 @@ removable and network volumes." | |||
| 132 | 132 | ||
| 133 | (defcustom save-place-ignore-files-regexp | 133 | (defcustom save-place-ignore-files-regexp |
| 134 | "\\(?:COMMIT_EDITMSG\\|hg-editor-[[:alnum:]]+\\.txt\\|svn-commit\\.tmp\\|bzr_log\\.[[:alnum:]]+\\)$" | 134 | "\\(?:COMMIT_EDITMSG\\|hg-editor-[[:alnum:]]+\\.txt\\|svn-commit\\.tmp\\|bzr_log\\.[[:alnum:]]+\\)$" |
| 135 | "Regexp matching files for which no location should be recorded. | 135 | "Regexp matching files for which no position should be recorded. |
| 136 | Useful for temporary file such as commit message files that are | 136 | Useful for temporary file such as commit message files that are |
| 137 | automatically created by the VCS." | 137 | automatically created by the VCS. If set to nil, this feature is |
| 138 | disabled, i.e., the position is recorded for all files." | ||
| 138 | :version "24.1" | 139 | :version "24.1" |
| 139 | :type 'regexp :group 'save-place) | 140 | :type 'regexp :group 'save-place) |
| 140 | 141 | ||
| @@ -169,8 +170,9 @@ To save places automatically in all files, put this in your `.emacs' file: | |||
| 169 | ;; will be saved again when Emacs is killed. | 170 | ;; will be saved again when Emacs is killed. |
| 170 | (or save-place-loaded (load-save-place-alist-from-file)) | 171 | (or save-place-loaded (load-save-place-alist-from-file)) |
| 171 | (when (and buffer-file-name | 172 | (when (and buffer-file-name |
| 172 | (not (string-match save-place-ignore-files-regexp | 173 | (or (not save-place-ignore-files-regexp) |
| 173 | buffer-file-name))) | 174 | (not (string-match save-place-ignore-files-regexp |
| 175 | buffer-file-name)))) | ||
| 174 | (let ((cell (assoc buffer-file-name save-place-alist)) | 176 | (let ((cell (assoc buffer-file-name save-place-alist)) |
| 175 | (position (if (not (eq major-mode 'hexl-mode)) | 177 | (position (if (not (eq major-mode 'hexl-mode)) |
| 176 | (point) | 178 | (point) |