summaryrefslogtreecommitdiff
path: root/basic.el
diff options
context:
space:
mode:
Diffstat (limited to 'basic.el')
-rw-r--r--basic.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/basic.el b/basic.el
index 431c05a..c248296 100644
--- a/basic.el
+++ b/basic.el
@@ -140,7 +140,7 @@ This will maintain the frame's width and height as well."
(set-frame-width (selected-frame) width nil t)
(set-frame-height (selected-frame) height nil t)))
-(durand-hide-minor-mode buffer-face-mode face-remap "BF")
+(durand-hide-minor-mode buffer-face-mode face-remap " BF")
;;; disable line numbers, as that is a performace killer for me.
@@ -425,6 +425,18 @@ Don't ask me to confirm my choice. --- Durand"
(advice-add 'bookmark-completing-read :override #'durand-bookmark-completing-read)
+(define-key global-map (vector ?\s-Z) #'undo-only)
+
+;;; Save close
+
+;;;###autoload
+(defun durand-confirm-execute (fun &rest args)
+ "Ask for confirmation to execute FUN with ARGS."
+ (cond ((y-or-n-p (format "Sure to execute %S" this-command))
+ (apply fun args))
+ ((message "No need to thank me. :-)"))))
+
+(advice-add #'save-buffers-kill-terminal :around #'durand-confirm-execute)
;;; Package management
@@ -438,8 +450,7 @@ Don't ask me to confirm my choice. --- Durand"
The remaining CONFIGS are evaluated after the package is loaded."
(declare (indent 2) (debug defun))
`(progn
- (add-to-list 'load-path
- (expand-file-name ,package-path ,package-dir))
+ (add-to-list 'load-path (expand-file-name ,package-path ,package-dir))
(require ,package-name)
,@configs))