diff options
| author | Mark Oteiza | 2016-12-13 11:41:45 -0500 |
|---|---|---|
| committer | Mark Oteiza | 2016-12-13 11:41:45 -0500 |
| commit | 86762eb174653ead8fa8c5d1cd5b263e9e0a2ac6 (patch) | |
| tree | c3e7088a176709770e64fe463a7090b24a9a0060 | |
| parent | bed0373855ea67ca0c393175e6b870b8a7c5ab9c (diff) | |
| download | emacs-86762eb174653ead8fa8c5d1cd5b263e9e0a2ac6.tar.gz emacs-86762eb174653ead8fa8c5d1cd5b263e9e0a2ac6.zip | |
Remove image-dired-kill-buffer-and-window
This breaks window layout, especially when quitting a
image-dired-display-image-mode buffer.
* lisp/image-dired.el (image-dired-thumbnail-mode-map):
(image-dired-display-image-mode-map): Replace in keymap and menu items
bindings to image-dired-kill-buffer-and-window with quit-window.
(image-dired-kill-buffer-and-window): Remove.
| -rw-r--r-- | lisp/image-dired.el | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 80b57336ac8..30705f841e7 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el | |||
| @@ -1331,7 +1331,7 @@ You probably want to use this together with | |||
| 1331 | (define-key map " " 'image-dired-display-next-thumbnail-original) | 1331 | (define-key map " " 'image-dired-display-next-thumbnail-original) |
| 1332 | (define-key map (kbd "DEL") 'image-dired-display-previous-thumbnail-original) | 1332 | (define-key map (kbd "DEL") 'image-dired-display-previous-thumbnail-original) |
| 1333 | (define-key map "c" 'image-dired-comment-thumbnail) | 1333 | (define-key map "c" 'image-dired-comment-thumbnail) |
| 1334 | (define-key map "q" 'image-dired-kill-buffer-and-window) | 1334 | (define-key map "q" 'quit-window) |
| 1335 | 1335 | ||
| 1336 | ;; Mouse | 1336 | ;; Mouse |
| 1337 | (define-key map [mouse-2] 'image-dired-mouse-display-image) | 1337 | (define-key map [mouse-2] 'image-dired-mouse-display-image) |
| @@ -1348,7 +1348,7 @@ You probably want to use this together with | |||
| 1348 | (easy-menu-define nil map | 1348 | (easy-menu-define nil map |
| 1349 | "Menu for `image-dired-thumbnail-mode'." | 1349 | "Menu for `image-dired-thumbnail-mode'." |
| 1350 | '("Image-Dired" | 1350 | '("Image-Dired" |
| 1351 | ["Quit" image-dired-kill-buffer-and-window] | 1351 | ["Quit" quit-window] |
| 1352 | ["Delete thumbnail from buffer" image-dired-delete-char] | 1352 | ["Delete thumbnail from buffer" image-dired-delete-char] |
| 1353 | ["Remove tag from thumbnail" image-dired-tag-thumbnail-remove] | 1353 | ["Remove tag from thumbnail" image-dired-tag-thumbnail-remove] |
| 1354 | ["Tag thumbnail" image-dired-tag-thumbnail] | 1354 | ["Tag thumbnail" image-dired-tag-thumbnail] |
| @@ -1378,14 +1378,14 @@ You probably want to use this together with | |||
| 1378 | 1378 | ||
| 1379 | (defvar image-dired-display-image-mode-map | 1379 | (defvar image-dired-display-image-mode-map |
| 1380 | (let ((map (make-sparse-keymap))) | 1380 | (let ((map (make-sparse-keymap))) |
| 1381 | (define-key map "q" 'image-dired-kill-buffer-and-window) | 1381 | (define-key map "q" 'quit-window) |
| 1382 | (define-key map "f" 'image-dired-display-current-image-full) | 1382 | (define-key map "f" 'image-dired-display-current-image-full) |
| 1383 | (define-key map "s" 'image-dired-display-current-image-sized) | 1383 | (define-key map "s" 'image-dired-display-current-image-sized) |
| 1384 | 1384 | ||
| 1385 | (easy-menu-define nil map | 1385 | (easy-menu-define nil map |
| 1386 | "Menu for `image-dired-display-image-mode-map'." | 1386 | "Menu for `image-dired-display-image-mode-map'." |
| 1387 | '("Image-Dired" | 1387 | '("Image-Dired" |
| 1388 | ["Quit" image-dired-kill-buffer-and-window] | 1388 | ["Quit" quit-window] |
| 1389 | ["Display original, sized to fit" image-dired-display-current-image-sized] | 1389 | ["Display original, sized to fit" image-dired-display-current-image-sized] |
| 1390 | ["Display original, full size" image-dired-display-current-image-full])) | 1390 | ["Display original, full size" image-dired-display-current-image-full])) |
| 1391 | map) | 1391 | map) |
| @@ -2336,15 +2336,6 @@ when using per-directory thumbnail file storage")) | |||
| 2336 | (insert " </body>\n") | 2336 | (insert " </body>\n") |
| 2337 | (insert "</html>")))) | 2337 | (insert "</html>")))) |
| 2338 | 2338 | ||
| 2339 | (defun image-dired-kill-buffer-and-window () | ||
| 2340 | "Kill the current buffer and, if possible, also the window." | ||
| 2341 | (interactive) | ||
| 2342 | (let ((buffer (current-buffer))) | ||
| 2343 | (condition-case nil | ||
| 2344 | (delete-window (selected-window)) | ||
| 2345 | (error nil)) | ||
| 2346 | (kill-buffer buffer))) | ||
| 2347 | |||
| 2348 | (defvar image-dired-widget-list nil | 2339 | (defvar image-dired-widget-list nil |
| 2349 | "List to keep track of meta data in edit buffer.") | 2340 | "List to keep track of meta data in edit buffer.") |
| 2350 | 2341 | ||