- (if buffer-file-name
- (progn
- (let ((cell (assoc buffer-file-name save-place-alist))
- (position (if (not (eq major-mode 'hexl-mode))
- (point)
- (with-no-warnings
- (1+ (hexl-current-address))))))
- (if cell
- (setq save-place-alist (delq cell save-place-alist)))
- (if (and save-place
- (not (= position 1))) ;; Optimize out the degenerate case.
- (setq save-place-alist
- (cons (cons buffer-file-name position)
- save-place-alist)))))))
+ (when (and 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)
+ (with-no-warnings
+ (1+ (hexl-current-address))))))
+ (if cell
+ (setq save-place-alist (delq cell save-place-alist)))
+ (if (and save-place
+ (not (= position 1))) ;; Optimize out the degenerate case.
+ (setq save-place-alist
+ (cons (cons buffer-file-name position)
+ save-place-alist))))))