diff --git a/README.org b/README.org index 51aeb84..b9d82f8 100644 --- a/README.org +++ b/README.org @@ -5753,19 +5753,16 @@ formatter for Python]]. :CUSTOM_ID: sec:smart-snippets :END: -#+caption[Enable =yas-global-mode=]: -#+caption: Enable =yas-global-mode=. -#+name: lst:enable-yas-global-mode +#+caption[Setup =yasnippet=]: +#+caption: Setup =yasnippet=. +#+name: lst:setup-yasnippet #+begin_src emacs-lisp -n :results silent (when (ensure-package-installation 'yasnippet) ;; Set `yas-alias-to-yas/prefix-p' before loading `yasnippet'. (setopt yas-alias-to-yas/prefix-p nil) - (when (fboundp 'yas-minor-mode) - (dolist (symbol '(LaTeX-mode-hook - org-mode-hook - python-mode-hook - python-ts-mode-hook)) - (add-hook symbol #'yas-minor-mode)))) + (add-hook 'LaTeX-mode-hook #'yas-minor-mode) + (add-hook 'org-mode-hook #'yas-minor-mode) + (add-hook 'python-mode-hook #'yas-minor-mode)) #+end_src * [[info:emacs#Display][Display (info)]] @@ -5878,11 +5875,10 @@ point movements visually. (pulse-delay 0.1)) (pulse-momentary-highlight-one-line (point)))) -(dolist (command '(scroll-up-command - scroll-down-command - recenter-top-bottom - other-window)) - (advice-add command :after #'flash-line-around-point)) +(advice-add 'scroll-up-command :after #'flash-line-around-point) +(advice-add 'scroll-down-command :after #'flash-line-around-point) +(advice-add 'recenter-top-bottom :after #'flash-line-around-point) +(advice-add 'other-window :after #'flash-line-around-point) #+end_src * Applications