diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-08-20 12:30:23 -0400 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-08-20 12:30:23 -0400 |
| commit | 63d2c2184941902e2358d0e9b0deb17b943db61a (patch) | |
| tree | e6c6fcc94331c32b306232147a605a6b5d3b3076 /poly-lock.el | |
| parent | eb793e18ad9c9c41aa01b94592cbd51da08a3ada (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 'poly-lock.el')
| -rw-r--r-- | poly-lock.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/poly-lock.el b/poly-lock.el index e6547b4..9869260 100644 --- a/poly-lock.el +++ b/poly-lock.el @@ -1,6 +1,6 @@ ;;; poly-lock.el --- Font lock sub-system for polymode -*- lexical-binding: t -*- ;; -;; Copyright (C) 2013-2019, Vitalie Spinu +;; Copyright (C) 2013-2022 Free Software Foundation, Inc. ;; Author: Vitalie Spinu ;; URL: https://github.com/polymode/polymode ;; @@ -121,14 +121,14 @@ switched on." ;; register extra functionality. [Unfortunately `jit-lock-register' ;; calls `jit-lock-mode' which we don't want. Hence the advice. TOTHINK: ;; Simply add-hook to `jit-lock-functions'?] - (jit-lock-register 'font-lock-fontify-region) + (jit-lock-register #'font-lock-fontify-region) ;; don't allow other functions (setq-local fontification-functions '(poly-lock-function)) - (setq-local font-lock-flush-function 'poly-lock-flush) - (setq-local font-lock-fontify-buffer-function 'poly-lock-flush) - (setq-local font-lock-ensure-function 'poly-lock-fontify-now) + (setq-local font-lock-flush-function #'poly-lock-flush) + (setq-local font-lock-fontify-buffer-function #'poly-lock-flush) + (setq-local font-lock-ensure-function #'poly-lock-fontify-now) ;; There are some more, jit-lock doesn't change those, neither do we: ;; font-lock-unfontify-region-function (defaults to font-lock-default-unfontify-region) @@ -144,19 +144,19 @@ switched on." (font-lock-default-function arg) ;; Must happen after call to `font-lock-default-function' - (remove-hook 'after-change-functions 'font-lock-after-change-function t) - (remove-hook 'after-change-functions 'jit-lock-after-change t) - (add-hook 'after-change-functions 'poly-lock-after-change nil t) + (remove-hook 'after-change-functions #'font-lock-after-change-function t) + (remove-hook 'after-change-functions #'jit-lock-after-change t) + (add-hook 'after-change-functions #'poly-lock-after-change nil t) ;; Reusing jit-lock var becuase modes populate it directly. We are using ;; this in `poly-lock-after-change' below. Taken from `jit-lock ;; initialization. (add-hook 'jit-lock-after-change-extend-region-functions - 'font-lock-extend-jit-lock-region-after-change + #'font-lock-extend-jit-lock-region-after-change nil t)) - (remove-hook 'after-change-functions 'poly-lock-after-change t) - (remove-hook 'fontification-functions 'poly-lock-function t)) + (remove-hook 'after-change-functions #'poly-lock-after-change t) + (remove-hook 'fontification-functions #'poly-lock-function t)) (current-buffer)) (defvar poly-lock-chunk-size 2500 @@ -492,7 +492,7 @@ Assumes widen buffer. Sets `jit-lock-start' and `jit-lock-end'." (put-text-property jit-lock-start jit-lock-end 'fontified nil)))))))))) (defun poly-lock-after-change (beg end old-len) - "Mark changed region with 'fontified nil. + "Mark changed region with `fontified' nil. Extend the region to spans which need to be updated. BEG, END and OLD-LEN are as in `after-change-functions'. When `poly-lock-defer-after-change' is non-nil (the default), run fontification" @@ -546,7 +546,7 @@ OLD-LEN are as in `after-change-functions'. When (declare-function pm-get-adjust-face "polymode-methods") (defvar poly-lock--extra-span-props (when (fboundp 'set-face-extend) (list :extend t))) (defun poly-lock-adjust-span-face (span) - "Adjust 'face property of SPAN.. + "Adjust `face' property of SPAN.. How adjustment is made is defined in :adjust-face slot of the SPAN's chunkmode." (interactive "r") |
