emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/setup 757de04 21/25: Replace yasnippet example with dir


From: Stefan Monnier
Subject: [elpa] externals/setup 757de04 21/25: Replace yasnippet example with dired
Date: Wed, 14 Apr 2021 18:49:03 -0400 (EDT)

branch: externals/setup
commit 757de049f3272f206ee56bacd9bc973b9cc3e8ca
Author: Philip K <philipk@posteo.net>
Commit: Philip K <philipk@posteo.net>

    Replace yasnippet example with dired
---
 README.md | 31 ++++++++++++++-----------------
 setup.el  | 31 ++++++++++++++-----------------
 2 files changed, 28 insertions(+), 34 deletions(-)

diff --git a/README.md b/README.md
index a97a7ff..00e304a 100644
--- a/README.md
+++ b/README.md
@@ -10,16 +10,15 @@ example, these macros:
     (:global key shell)
     (:bind key bury-buffer)))
 
+(setup dired
+  (:also-load dired-x)
+  (:option (prepend dired-guess-shell-alist-user) '("" "xdg-open")
+           dired-dwim-target t")
+  (:hook auto-revert-mode))
+
 (setup (:package paredit)
   (:hide-mode)
   (:hook-into scheme-mode lisp-mode))
-
-(setup (:package yasnippet)
-  (:with-mode yas-minor-mode
-    (:rebind "<backtab>" yas-expand)
-    (:option yas-prompt-functions '(yas-completing-prompt)
-             yas-wrap-around-region t)
-    (:hook-into prog-mode)))
 ~~~
 
 will be replaced with the functional equivalent of
@@ -29,6 +28,14 @@ will be replaced with the functional equivalent of
 (with-eval-after-load 'shell
   (define-key shell-mode-map (kbd "C-c s") #'bury-buffer))
 
+(with-eval-after-load 'dired
+  (require 'dired-x))
+(customize-set-variable 'dired-guess-shell-alist-user
+                        (cons '("" "xdg-open")
+                             dired-guess-shell-alist-user))
+(customize-set-variable 'dired-dwim-target t)
+(add-hook 'dired-mode-hook #'auto-revert-mode)
+
 (unless (package-install-p 'paredit)
   (package-install 'paredit))
 (setq minor-mode-alist
@@ -36,16 +43,6 @@ will be replaced with the functional equivalent of
             minor-mode-alist))
 (add-hook 'scheme-mode-hook #'paredit-mode)
 (add-hook 'lisp-mode-hook #'paredit-mode)
-
-(unless (package-install-p 'yasnippet)
-  (package-install 'yasnippet))
-(with-eval-after-load 'yasnippet
-  (dolist (key (where-is-internal 'yas-expand yas-minor-mode-map))
-    (define-key yas-minor-mode-map key nil))
-  (define-key yas-minor-mode-map (kbd "<backtab>") #'yas-expand))
-(customize-set-variable 'yas-prompt-functions '(yas-completing-prompt))
-(customize-set-variable 'yas-wrap-around-region t)
-(add-hook 'prog-mode-hook #'yas-minor-mode)
 ~~~
 
 Additional "keywords" can be defined using `setup-define`. All known
diff --git a/setup.el b/setup.el
index 18527ab..90cded2 100644
--- a/setup.el
+++ b/setup.el
@@ -32,16 +32,15 @@
 ;;        (:global key shell)
 ;;        (:bind key bury-buffer)))
 ;;
+;;    (setup dired
+;;      (:also-load dired-x)
+;;      (:option (prepend dired-guess-shell-alist-user) '("" "xdg-open")
+;;               dired-dwim-target t")
+;;      (:hook auto-revert-mode))
+;;
 ;;    (setup (:package paredit)
 ;;      (:hide-mode)
 ;;      (:hook-into scheme-mode lisp-mode))
-;;
-;;    (setup (:package yasnippet)
-;;      (:with-mode yas-minor-mode
-;;        (:rebind "<backtab>" yas-expand)
-;;        (:option yas-prompt-functions '(yas-completing-prompt)
-;;                 yas-wrap-around-region t)
-;;        (:hook-into prog-mode)))
 
 ;; will be replaced with the functional equivalent of
 
@@ -49,6 +48,14 @@
 ;;    (with-eval-after-load 'shell
 ;;      (define-key shell-mode-map (kbd "C-c s") #'bury-buffer))
 ;;
+;;    (with-eval-after-load 'dired
+;;      (require 'dired-x))
+;;    (customize-set-variable 'dired-guess-shell-alist-user
+;;                            (cons '("" "xdg-open")
+;;                                  dired-guess-shell-alist-user))
+;;    (customize-set-variable 'dired-dwim-target t)
+;;    (add-hook 'dired-mode-hook #'auto-revert-mode)
+;;
 ;;    (unless (package-install-p 'paredit)
 ;;      (package-install 'paredit))
 ;;    (setq minor-mode-alist
@@ -56,16 +63,6 @@
 ;;                minor-mode-alist))
 ;;    (add-hook 'scheme-mode-hook #'paredit-mode)
 ;;    (add-hook 'lisp-mode-hook #'paredit-mode)
-;;
-;;    (unless (package-install-p 'yasnippet)
-;;      (package-install 'yasnippet))
-;;    (with-eval-after-load 'yasnippet
-;;      (dolist (key (where-is-internal 'yas-expand yas-minor-mode-map))
-;;        (define-key yas-minor-mode-map key nil))
-;;      (define-key yas-minor-mode-map (kbd "<backtab>") #'yas-expand))
-;;    (customize-set-variable 'yas-prompt-functions '(yas-completing-prompt))
-;;    (customize-set-variable 'yas-wrap-around-region t)
-;;    (add-hook 'prog-mode-hook #'yas-minor-mode)
 
 ;; Additional "keywords" can be defined using `setup-define'.  All
 ;; known keywords are documented in the docstring for `setup'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]