diff options
| author | Stefan Monnier | 2016-01-25 09:42:06 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2016-01-25 09:42:06 -0500 |
| commit | bb1bfb7123ff7149f47cdb64570d353e4918bd57 (patch) | |
| tree | ffda80015f1befbd0dfe4d01ad4ef2b9a677851a | |
| parent | 6d25cbeaaf93615b8d7f26024ba014104eb5d4f2 (diff) | |
| download | emacs-bb1bfb7123ff7149f47cdb64570d353e4918bd57.tar.gz emacs-bb1bfb7123ff7149f47cdb64570d353e4918bd57.zip | |
* lisp/font-lock.el: Use #' to quote function symbols
| -rw-r--r-- | lisp/font-lock.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index c79835dda49..988bf7bd216 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | ;; | 39 | ;; |
| 40 | ;; To turn Font Lock mode on automatically, add this to your init file: | 40 | ;; To turn Font Lock mode on automatically, add this to your init file: |
| 41 | ;; | 41 | ;; |
| 42 | ;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock) | 42 | ;; (add-hook 'emacs-lisp-mode-hook #'turn-on-font-lock) |
| 43 | ;; | 43 | ;; |
| 44 | ;; Or if you want to turn Font Lock mode on in many modes: | 44 | ;; Or if you want to turn Font Lock mode on in many modes: |
| 45 | ;; | 45 | ;; |
| @@ -562,11 +562,11 @@ When called with no args it should leave point at the beginning of any | |||
| 562 | enclosing textual block and mark at the end. | 562 | enclosing textual block and mark at the end. |
| 563 | This is normally set via `font-lock-defaults'.") | 563 | This is normally set via `font-lock-defaults'.") |
| 564 | 564 | ||
| 565 | (defvar font-lock-fontify-buffer-function 'font-lock-default-fontify-buffer | 565 | (defvar font-lock-fontify-buffer-function #'font-lock-default-fontify-buffer |
| 566 | "Function to use for fontifying the buffer. | 566 | "Function to use for fontifying the buffer. |
| 567 | This is normally set via `font-lock-defaults'.") | 567 | This is normally set via `font-lock-defaults'.") |
| 568 | 568 | ||
| 569 | (defvar font-lock-unfontify-buffer-function 'font-lock-default-unfontify-buffer | 569 | (defvar font-lock-unfontify-buffer-function #'font-lock-default-unfontify-buffer |
| 570 | "Function to use for unfontifying the buffer. | 570 | "Function to use for unfontifying the buffer. |
| 571 | This is used when turning off Font Lock mode. | 571 | This is used when turning off Font Lock mode. |
| 572 | This is normally set via `font-lock-defaults'.") | 572 | This is normally set via `font-lock-defaults'.") |
| @@ -580,7 +580,7 @@ If it fontifies a larger region, it should ideally return a list of the form | |||
| 580 | \(jit-lock-bounds BEG . END) indicating the bounds of the region actually | 580 | \(jit-lock-bounds BEG . END) indicating the bounds of the region actually |
| 581 | fontified.") | 581 | fontified.") |
| 582 | 582 | ||
| 583 | (defvar font-lock-unfontify-region-function 'font-lock-default-unfontify-region | 583 | (defvar font-lock-unfontify-region-function #'font-lock-default-unfontify-region |
| 584 | "Function to use for unfontifying a region. | 584 | "Function to use for unfontifying a region. |
| 585 | It should take two args, the beginning and end of the region. | 585 | It should take two args, the beginning and end of the region. |
| 586 | This is normally set via `font-lock-defaults'.") | 586 | This is normally set via `font-lock-defaults'.") |
| @@ -647,12 +647,12 @@ be enabled." | |||
| 647 | (defun font-lock-mode-internal (arg) | 647 | (defun font-lock-mode-internal (arg) |
| 648 | ;; Turn on Font Lock mode. | 648 | ;; Turn on Font Lock mode. |
| 649 | (when arg | 649 | (when arg |
| 650 | (add-hook 'after-change-functions 'font-lock-after-change-function t t) | 650 | (add-hook 'after-change-functions #'font-lock-after-change-function t t) |
| 651 | (font-lock-set-defaults) | 651 | (font-lock-set-defaults) |
| 652 | (font-lock-turn-on-thing-lock)) | 652 | (font-lock-turn-on-thing-lock)) |
| 653 | ;; Turn off Font Lock mode. | 653 | ;; Turn off Font Lock mode. |
| 654 | (unless font-lock-mode | 654 | (unless font-lock-mode |
| 655 | (remove-hook 'after-change-functions 'font-lock-after-change-function t) | 655 | (remove-hook 'after-change-functions #'font-lock-after-change-function t) |
| 656 | (font-lock-unfontify-buffer) | 656 | (font-lock-unfontify-buffer) |
| 657 | (font-lock-turn-off-thing-lock))) | 657 | (font-lock-turn-off-thing-lock))) |
| 658 | 658 | ||
| @@ -911,17 +911,17 @@ The value of this variable is used when Font Lock mode is turned on." | |||
| 911 | (`jit-lock-mode | 911 | (`jit-lock-mode |
| 912 | ;; Prepare for jit-lock | 912 | ;; Prepare for jit-lock |
| 913 | (remove-hook 'after-change-functions | 913 | (remove-hook 'after-change-functions |
| 914 | 'font-lock-after-change-function t) | 914 | #'font-lock-after-change-function t) |
| 915 | (set (make-local-variable 'font-lock-flush-function) | 915 | (set (make-local-variable 'font-lock-flush-function) |
| 916 | 'jit-lock-refontify) | 916 | #'jit-lock-refontify) |
| 917 | (set (make-local-variable 'font-lock-ensure-function) | 917 | (set (make-local-variable 'font-lock-ensure-function) |
| 918 | 'jit-lock-fontify-now) | 918 | #'jit-lock-fontify-now) |
| 919 | ;; Prevent font-lock-fontify-buffer from fontifying eagerly the whole | 919 | ;; Prevent font-lock-fontify-buffer from fontifying eagerly the whole |
| 920 | ;; buffer. This is important for things like CWarn mode which | 920 | ;; buffer. This is important for things like CWarn mode which |
| 921 | ;; adds/removes a few keywords and does a refontify (which takes ages on | 921 | ;; adds/removes a few keywords and does a refontify (which takes ages on |
| 922 | ;; large files). | 922 | ;; large files). |
| 923 | (set (make-local-variable 'font-lock-fontify-buffer-function) | 923 | (set (make-local-variable 'font-lock-fontify-buffer-function) |
| 924 | 'jit-lock-refontify) | 924 | #'jit-lock-refontify) |
| 925 | ;; Don't fontify eagerly (and don't abort if the buffer is large). | 925 | ;; Don't fontify eagerly (and don't abort if the buffer is large). |
| 926 | (set (make-local-variable 'font-lock-fontified) t) | 926 | (set (make-local-variable 'font-lock-fontified) t) |
| 927 | ;; Use jit-lock. | 927 | ;; Use jit-lock. |
| @@ -929,7 +929,7 @@ The value of this variable is used when Font Lock mode is turned on." | |||
| 929 | (not font-lock-keywords-only)) | 929 | (not font-lock-keywords-only)) |
| 930 | ;; Tell jit-lock how we extend the region to refontify. | 930 | ;; Tell jit-lock how we extend the region to refontify. |
| 931 | (add-hook 'jit-lock-after-change-extend-region-functions | 931 | (add-hook 'jit-lock-after-change-extend-region-functions |
| 932 | 'font-lock-extend-jit-lock-region-after-change | 932 | #'font-lock-extend-jit-lock-region-after-change |
| 933 | nil t)))) | 933 | nil t)))) |
| 934 | 934 | ||
| 935 | (defun font-lock-turn-off-thing-lock () | 935 | (defun font-lock-turn-off-thing-lock () |
| @@ -1759,7 +1759,7 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for | |||
| 1759 | (mapcar #'font-lock-compile-keyword keywords)))) | 1759 | (mapcar #'font-lock-compile-keyword keywords)))) |
| 1760 | (if (and (not syntactic-keywords) | 1760 | (if (and (not syntactic-keywords) |
| 1761 | (let ((beg-function syntax-begin-function)) | 1761 | (let ((beg-function syntax-begin-function)) |
| 1762 | (or (eq beg-function 'beginning-of-defun) | 1762 | (or (eq beg-function #'beginning-of-defun) |
| 1763 | (if (symbolp beg-function) | 1763 | (if (symbolp beg-function) |
| 1764 | (get beg-function 'font-lock-syntax-paren-check)))) | 1764 | (get beg-function 'font-lock-syntax-paren-check)))) |
| 1765 | (not beginning-of-defun-function)) | 1765 | (not beginning-of-defun-function)) |
| @@ -1880,7 +1880,7 @@ Sets various variables using `font-lock-defaults' and | |||
| 1880 | (let ((syntax (cdr selem))) | 1880 | (let ((syntax (cdr selem))) |
| 1881 | (dolist (char (if (numberp (car selem)) | 1881 | (dolist (char (if (numberp (car selem)) |
| 1882 | (list (car selem)) | 1882 | (list (car selem)) |
| 1883 | (mapcar 'identity (car selem)))) | 1883 | (mapcar #'identity (car selem)))) |
| 1884 | (modify-syntax-entry char syntax font-lock-syntax-table))))) | 1884 | (modify-syntax-entry char syntax font-lock-syntax-table))))) |
| 1885 | ;; (nth 4 defaults) used to hold `font-lock-beginning-of-syntax-function', | 1885 | ;; (nth 4 defaults) used to hold `font-lock-beginning-of-syntax-function', |
| 1886 | ;; but that was removed in 25.1, so if it's a cons cell, we assume that | 1886 | ;; but that was removed in 25.1, so if it's a cons cell, we assume that |
| @@ -2143,7 +2143,7 @@ Sets various variables using `font-lock-defaults' and | |||
| 2143 | ;; ;; The default level is usually, but not necessarily, level 1. | 2143 | ;; ;; The default level is usually, but not necessarily, level 1. |
| 2144 | ;; (setq level (- (length keywords) | 2144 | ;; (setq level (- (length keywords) |
| 2145 | ;; (length (member (eval (car keywords)) | 2145 | ;; (length (member (eval (car keywords)) |
| 2146 | ;; (mapcar 'eval (cdr keywords)))))))) | 2146 | ;; (mapcar #'eval (cdr keywords)))))))) |
| 2147 | ;; (setq font-lock-fontify-level (list level (> level 1) | 2147 | ;; (setq font-lock-fontify-level (list level (> level 1) |
| 2148 | ;; (< level (1- (length keywords)))))))) | 2148 | ;; (< level (1- (length keywords)))))))) |
| 2149 | ;; | 2149 | ;; |