General, minor refactors & comment revision

This commit is contained in:
Henrik Lissner 2019-09-11 23:32:46 -04:00
parent f9feaec5bd
commit 1c05773c39
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 9 additions and 10 deletions

View file

@ -66,10 +66,10 @@ If no viewers are found, `latex-preview-pane' is used.")
(cl-find-if #'byte-code-function-p find-file-hook)
'local))
(add-hook 'latex-mode-local-vars-hook #'flyspell-mode!)
;; All these excess pairs dramatically slow down typing in latex buffers, so
;; we remove them. Let snippets do their job.
(after! smartparens-latex
(let ((modes '(tex-mode plain-tex-mode latex-mode LaTeX-mode)))
;; All these excess pairs dramatically slow down typing in latex buffers,
;; so we remove them. Let snippets do their job.
(dolist (open '("\\left(" "\\left[" "\\left\\{" "\\left|"
"\\bigl(" "\\biggl(" "\\Bigl(" "\\Biggl(" "\\bigl["
"\\biggl[" "\\Bigl[" "\\Biggl[" "\\bigl\\{" "\\biggl\\{"
@ -77,6 +77,8 @@ If no viewers are found, `latex-preview-pane' is used.")
"\\lfloor" "\\lceil" "\\langle"
"\\lVert" "\\lvert" "`"))
(sp-local-pair modes open nil :actions :rem))
;; And tweak these so that users can decide whether they want use latex
;; quotes or not, via `+latex-enable-plain-double-quotes'
(sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))))

View file

@ -97,7 +97,8 @@
(advice-add #'org-return-indent :after #'+org-fix-newline-and-indent-in-src-blocks-a)
;; `org-babel-get-header' was removed from org in 9.0. Quite a few babel
;; plugins use it, so until those plugins update, this polyfill will do:
;; plugins use it (like ob-spice), so until those plugins update, this
;; polyfill will do:
(defun org-babel-get-header (params key &optional others)
(cl-loop with fn = (if others #'not #'identity)
for p in params