summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index c3bab31..bd29a73 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -40,6 +40,13 @@
into exps
finally return `(progn ,@exps)))
+(defmacro without-advice (symbol where advice &rest body)
+ (declare (indent 3))
+ `(let ((adv-p (advice-member-p ,advice ,symbol)))
+ (when adv-p (advice-remove ,symbol ,advice))
+ (unwind-protect (progn ,@body)
+ (when adv-p (advice-add ,symbol ,where ,advice)))))
+
(defun add-hooks (fun &rest modes)
"Add a function to multiple mode hooks at once."
(dolist (mode modes)
@@ -177,8 +184,15 @@
;; completion-styles '(helm-flex)
)
(helm-mode 1)
-(helm-ext-ff-enable-skipping-dots t)
(helm-ext-minibuffer-enable-header-line-maybe t)
+(helm-ext-ff-enable-skipping-dots t)
+(defun dired-dont-skip-dots (&rest args)
+ (interactive)
+ (without-advice 'helm-ff-move-to-first-real-candidate :around 'helm-ext-ff-skip-dots
+ (if (called-interactively-p)
+ (call-interactively #'dired)
+ (apply #'dired args))))
+(set-keys [remap dired] dired-dont-skip-dots)
;;; Helm-exwm
(autoload #'helm-exwm "helm-exwm" nil t)