diff options
author | David Li <li.davidm96@gmail.com> | 2018-03-04 19:50:27 -0500 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2018-03-04 19:50:27 -0500 |
commit | a69b0e1f7eb6b93688d48effb21760d656b4756a (patch) | |
tree | bc79106388d9b795d5024b7d39c482c818b70c80 | |
parent | 1b65da4f0aa16cc0ffe31aa1f105296a51bd133e (diff) |
Use adaptive-wrap mode when available
-rw-r--r-- | init.el | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -258,6 +258,14 @@ This functions should be added to the hooks of major modes for programming." (setq org-latex-listings t) ;; (add-to-list 'org-latex-packages-alist '("" "listings")) +;; adaptive-wrap when available + +(when (fboundp 'adaptive-wrap-prefix-mode) + (defun my-activate-adaptive-wrap-prefix-mode () + "Toggle `visual-line-mode' and `adaptive-wrap-prefix-mode' simultaneously." + (adaptive-wrap-prefix-mode (if visual-line-mode 1 -1))) + (add-hook 'visual-line-mode-hook 'my-activate-adaptive-wrap-prefix-mode)) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. |