summaryrefslogtreecommitdiff
path: root/lisp/saveplace.el
diff options
context:
space:
mode:
authorTassilo Horn <tassilo@member.fsf.org>2012-03-04 17:56:21 +0100
committerTassilo Horn <tassilo@member.fsf.org>2012-03-04 17:56:21 +0100
commit5dd11cfee60be557274ea95289d2d39972c37a9b (patch)
treecefb65cb923830bcf33f5de9dbd962a8057f54ca /lisp/saveplace.el
parentc349f4e6ff1aaa8ef11f051d7b32952e705e09d9 (diff)
downloademacs-5dd11cfee60be557274ea95289d2d39972c37a9b.tar.gz
* saveplace.el (save-place-to-alist)
(save-place-ignore-files-regexp): Allow value nil to disable this feature.
Diffstat (limited to 'lisp/saveplace.el')
-rw-r--r--lisp/saveplace.el10
1 files changed, 6 insertions, 4 deletions
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."
(defcustom save-place-ignore-files-regexp
"\\(?:COMMIT_EDITMSG\\|hg-editor-[[:alnum:]]+\\.txt\\|svn-commit\\.tmp\\|bzr_log\\.[[:alnum:]]+\\)$"
- "Regexp matching files for which no location should be recorded.
+ "Regexp matching files for which no position should be recorded.
Useful for temporary file such as commit message files that are
-automatically created by the VCS."
+automatically created by the VCS. If set to nil, this feature is
+disabled, i.e., the position is recorded for all files."
:version "24.1"
:type 'regexp :group 'save-place)
@@ -169,8 +170,9 @@ To save places automatically in all files, put this in your `.emacs' file:
;; will be saved again when Emacs is killed.
(or save-place-loaded (load-save-place-alist-from-file))
(when (and buffer-file-name
- (not (string-match save-place-ignore-files-regexp
- buffer-file-name)))
+ (or (not save-place-ignore-files-regexp)
+ (not (string-match save-place-ignore-files-regexp
+ buffer-file-name))))
(let ((cell (assoc buffer-file-name save-place-alist))
(position (if (not (eq major-mode 'hexl-mode))
(point)