summaryrefslogtreecommitdiff
path: root/polymode-compat.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-08-20 12:30:23 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-08-20 12:30:23 -0400
commit63d2c2184941902e2358d0e9b0deb17b943db61a (patch)
treee6c6fcc94331c32b306232147a605a6b5d3b3076 /polymode-compat.el
parenteb793e18ad9c9c41aa01b94592cbd51da08a3ada (diff)
Fix copyrights for GNU ELPAscratch/polymode
Assign the Copyright to the FSF. Include various other minor and cosmetic changes: - Prefer #' to quote function names. - Fix a few uses of ' in docstrings which can be rendered incorrectly. - Remove redundant `:group` args. - Use keyword args for `define-minor-mode` rather than obsolete positional arguments. - Use `lexical-binding`. - Add a `Copyright` line where missing. * polymode-classes.el (pm-chunkmode, pm-inner-chunkmode): Use `symbol` rather than `face` as type, since `face` is not actually defined as a type. * polymode-compat.el: Use `with-eval-after-load` throughout. * polymode-core.el: Don't use #' to quote the symbol passed to `advice-add` because this arg can't be just a function, it has to be a symbol. (pm-use-cache): Move before first use. * template/targets/utils.el (polymode-add-deps-to-load-path): Make better use of `expand-file-name`. * tests/compat-tests.el: Skip tests if `poly-markdown` is not available, instead of signaling an error.
Diffstat (limited to 'polymode-compat.el')
-rw-r--r--polymode-compat.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/polymode-compat.el b/polymode-compat.el
index 227a022..fa392e9 100644
--- a/polymode-compat.el
+++ b/polymode-compat.el
@@ -2,7 +2,7 @@
;;
;; Author: Vitalie Spinu
;; Maintainer: Vitalie Spinu
-;; Copyright (C) 2013-2019, Vitalie Spinu
+;; Copyright (C) 2013-2022 Free Software Foundation, Inc.
;; Version: 0.1
;; URL: https://github.com/polymode/polymode
;; Keywords: emacs
@@ -183,7 +183,7 @@ are passed to ORIG-FUN."
-;;; LSP (lsp-mode and elglot)
+;;; LSP (lsp-mode and eglot)
;;
;; Emacs modifications `after-change-functions' to LSP insertions
;; https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didChange
@@ -328,7 +328,7 @@ are passed to ORIG-FUN."
(or (car (get-text-property beg :pm-span))
(car (get-text-property end :pm-span))))
(add-hook 'flyspell-incorrect-hook
- 'pm--flyspel-dont-highlight-in-chunkmodes nil t)
+ #'pm--flyspel-dont-highlight-in-chunkmodes nil t)
;;; C/C++/Java
(pm-around-advice 'c-before-context-fl-expand-region #'pm-override-output-cons)
@@ -475,8 +475,8 @@ This is done by modifying `uniquify-buffer-base-name' to `pm--core-buffer-name'.
(null buffer-undo-tree))
(setq buffer-undo-tree (make-undo-tree))))
-(eval-after-load 'undo-tree
- '(add-hook 'polymode-init-inner-hook 'polymode-init-undo-tree-maybe))
+(with-eval-after-load 'undo-tree
+ (add-hook 'polymode-init-inner-hook #'polymode-init-undo-tree-maybe))
;;; EVIL
@@ -490,8 +490,8 @@ This is done by modifying `uniquify-buffer-base-name' to `pm--core-buffer-name'.
(with-current-buffer new-buffer
(evil-change-state old-state))))))
-(eval-after-load 'evil-core
- '(add-hook 'polymode-after-switch-buffer-hook 'polymode-switch-buffer-keep-evil-state-maybe))
+(with-eval-after-load 'evil-core
+ (add-hook 'polymode-after-switch-buffer-hook #'polymode-switch-buffer-keep-evil-state-maybe))
;;; HL line
@@ -507,8 +507,8 @@ This is done by modifying `uniquify-buffer-base-name' to `pm--core-buffer-name'.
(hl-line-unhighlight))
(when global-hl-line-mode
(global-hl-line-unhighlight))))
-(eval-after-load 'hl-line
- '(add-hook 'polymode-after-switch-buffer-hook 'polymode-switch-buffer-hl-unhighlight))
+(with-eval-after-load 'hl-line
+ (add-hook 'polymode-after-switch-buffer-hook #'polymode-switch-buffer-hl-unhighlight))
;;; YAS