diff options
| author | Michal Nazarewicz <mina86@mina86.com> | 2013-06-30 18:29:23 -0400 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-06-30 18:29:23 -0400 |
| commit | ef099a941f7fb2d74ce1768388463f18b284f9c5 (patch) | |
| tree | 1573bfacf90fc940c297c5428c132e9e65318716 /lisp/files.el | |
| parent | 6d89e343ab402851d94e37b2ca79a67e4c6fb474 (diff) | |
| download | emacs-ef099a941f7fb2d74ce1768388463f18b284f9c5.tar.gz | |
Add `remember-notes' function to store random notes across Emacs
restarts.
* remember.el (remember-data-file): Add :set callback to affect
notes buffer (if any).
(remember-notes): New command.
(remember-notes-buffer-name, bury-remember-notes-on-kill):
New defcustoms for the `remember-notes' function.
(remember-notes-save-and-bury-buffer): New command.
(remember-notes-mode-map): New variable.
(remember-mode): New minor mode.
(remember-notes--kill-buffer-query): New function.
* lisp/startup.el (initial-buffer-choice): Add notes to custom type.
* src/buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
before checking whether buffer is modified. This lets
`kill-buffer-query-functions' cancel killing of the buffer or save
its content before `kill-buffer' asks user the "Buffer %s
modified; kill anyway?" question.
* remember.el (remember-append-to-file):
Don't mix `find-buffer-visiting' and `get-file-buffer'.
* lisp/files.el (find-file-noselect): Simplify conditional expression.
Diffstat (limited to 'lisp/files.el')
| -rw-r--r-- | lisp/files.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/files.el b/lisp/files.el index 871a4b0548b..e59a9acb7b9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1859,13 +1859,12 @@ the various files." (setq buffer-read-only read-only))) (setq buffer-file-read-only read-only)) - (when (and (not (eq (not (null rawfile)) - (not (null find-file-literally)))) - (not nonexistent) - ;; It is confusing to ask whether to visit - ;; non-literally if they have the file in - ;; hexl-mode or image-mode. - (not (memq major-mode '(hexl-mode image-mode)))) + (unless (or (eq (null rawfile) (null find-file-literally)) + nonexistent + ;; It is confusing to ask whether to visit + ;; non-literally if they have the file in + ;; hexl-mode or image-mode. + (memq major-mode '(hexl-mode image-mode))) (if (buffer-modified-p) (if (y-or-n-p (format |
