diff options
| author | Stefan Kangas | 2024-02-12 02:38:30 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2024-02-12 02:43:35 +0100 |
| commit | 9ebc91795f22ca52ea019b8ce7fb1f6e4c8df826 (patch) | |
| tree | bd4627ed8a88d7f76e21b291c4b6c613402e9311 | |
| parent | 9a1522197fb16986c2f641f777d6bef41c348567 (diff) | |
| download | emacs-9ebc91795f22ca52ea019b8ce7fb1f6e4c8df826.tar.gz emacs-9ebc91795f22ca52ea019b8ce7fb1f6e4c8df826.zip | |
Remove redundant `apply` with `derived-mode-p`
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers):
* lisp/progmodes/which-func.el (which-func-try-to-enable):
(which-func-ff-hook): Remove redundant 'apply' with 'derived-mode-p'.
Suggested by Philip Kaludercic <philipk@posteo.net>.
| -rw-r--r-- | lisp/cedet/mode-local.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/which-func.el | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 28f14232704..9f11b9707bd 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mode-local.el --- Support for mode local facilities -*- lexical-binding:t -*- | 1 | ;;; mode-local.el --- Support for mode local facilities -*- lexical-binding:t -*- |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 2004-2005, 2007-2024 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2004-2024 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| 5 | ;; Author: David Ponce <david@dponce.com> | 5 | ;; Author: David Ponce <david@dponce.com> |
| 6 | ;; Created: 27 Apr 2004 | 6 | ;; Created: 27 Apr 2004 |
| @@ -84,7 +84,7 @@ MODES can be a symbol or a list of symbols. | |||
| 84 | FUNCTION does not have arguments." | 84 | FUNCTION does not have arguments." |
| 85 | (setq modes (ensure-list modes)) | 85 | (setq modes (ensure-list modes)) |
| 86 | (mode-local-map-file-buffers | 86 | (mode-local-map-file-buffers |
| 87 | function (lambda () (apply #'derived-mode-p modes)))) | 87 | function (lambda () (derived-mode-p modes)))) |
| 88 | 88 | ||
| 89 | ;;; Hook machinery | 89 | ;;; Hook machinery |
| 90 | ;; | 90 | ;; |
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 631cb3b0aef..b36e13104e3 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -211,7 +211,7 @@ non-nil.") | |||
| 211 | (when which-function-mode | 211 | (when which-function-mode |
| 212 | (unless (local-variable-p 'which-func-mode) | 212 | (unless (local-variable-p 'which-func-mode) |
| 213 | (setq which-func-mode (or (eq which-func-modes t) | 213 | (setq which-func-mode (or (eq which-func-modes t) |
| 214 | (apply #'derived-mode-p which-func-modes))) | 214 | (derived-mode-p which-func-modes))) |
| 215 | (setq which-func--use-mode-line | 215 | (setq which-func--use-mode-line |
| 216 | (member which-func-display '(mode mode-and-header))) | 216 | (member which-func-display '(mode mode-and-header))) |
| 217 | (setq which-func--use-header-line | 217 | (setq which-func--use-header-line |
| @@ -239,7 +239,7 @@ It creates the Imenu index for the buffer, if necessary." | |||
| 239 | 239 | ||
| 240 | (condition-case err | 240 | (condition-case err |
| 241 | (if (and which-func-mode | 241 | (if (and which-func-mode |
| 242 | (not (apply #'derived-mode-p which-func-non-auto-modes)) | 242 | (not (derived-mode-p which-func-non-auto-modes)) |
| 243 | (or (null which-func-maxout) | 243 | (or (null which-func-maxout) |
| 244 | (< buffer-saved-size which-func-maxout) | 244 | (< buffer-saved-size which-func-maxout) |
| 245 | (= which-func-maxout 0))) | 245 | (= which-func-maxout 0))) |