summaryrefslogtreecommitdiff
path: root/basic.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-02-08 23:36:26 +0800
committerJSDurand <mmemmew@gmail.com>2021-02-08 23:36:26 +0800
commit393604e5bf4ce15df7342fdc094900fd1be2b39f (patch)
treed7b1e77cfe27b3ffa347fa2e9db632d97dfe7dc1 /basic.el
parentc8d4224e42a710b262e8ba67d720f6eff4e89fcb (diff)
Constantly growing
A lot of improvements.
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))