]> code.delx.au - gnu-emacs/blobdiff - lisp/saveplace.el
There's no reason not to compile version.el
[gnu-emacs] / lisp / saveplace.el
index 5850d2b8d3334360e1fd8133e3b9317545f365f4..43dad63a14055411a1b9b2f3cf08984567d9a5f6 100644 (file)
@@ -132,9 +132,11 @@ 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)
 
 (defun toggle-save-place (&optional parg)
@@ -168,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)