From 23b8a3a2aca1dfeaad3f7034529b6384172c9f3f Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 20 Oct 2023 15:27:03 +0200 Subject: [PATCH] Remove gpolonkai/undo-buffer-kill and companion functions --- configuration.org | 30 ------------------------------ 1 file changed, 30 deletions(-) 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