diff --git a/configuration.org b/configuration.org index fd0f974..84edb60 100644 --- a/configuration.org +++ b/configuration.org @@ -649,35 +649,6 @@ line first. Then jump to the actual end of the line." (message "File '%s' successfully removed" filename))))) #+END_SRC -*** Allow reopening the previously closed file - -#+BEGIN_SRC emacs-lisp -(defvar gpolonkai/last-killed-buffer-file-name - nil - "The last killed buffer. - -Used by `gpolonkai/save-killed-buffer-filename' and `gpolonkai/undo-buffer-kill'.") - -(defun gpolonkai/save-killed-buffer-filename () - "Save the filename of the killed buffer in `gpolonkai/last-killed-buffer-file-name'." - (let ((filename (buffer-file-name))) - (unless filename - (setq gpolonkai/last-killed-buffer-file-name (buffer-file-name))))) - -(add-hook 'kill-buffer-hook 'gpolonkai/save-killed-buffer-filename) - -(defun gpolonkai/undo-buffer-kill () - "Undo killing the last buffer. - -Esentially it visits the file again." - (interactive) - (if gpolonkai/last-killed-buffer-file-name - (progn - (find-file gpolonkai/last-killed-buffer-file-name) - (setq gpolonkai/last-killed-buffer-file-name nil)) - (message "The buffer last killed didn’t visit a file."))) -#+END_SRC - *** Open this file as another user #+BEGIN_SRC emacs-lisp @@ -3880,7 +3851,6 @@ directory. It is available from [[http://plantuml.com/download][here]]. ("C-d" . delete-current-buffer-file) ("|" . toggle-window-split) ("k" . kill-this-buffer) - ("M-k" . gpolonkai/undo-buffer-kill) ("C-b" . bury-buffer) ("/" . repeat) :map isearch-mode-map