mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
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>.
This commit is contained in:
parent
9a1522197f
commit
9ebc91795f
@ -1,6 +1,6 @@
|
||||
;;; mode-local.el --- Support for mode local facilities -*- lexical-binding:t -*-
|
||||
;;
|
||||
;; Copyright (C) 2004-2005, 2007-2024 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; Author: David Ponce <david@dponce.com>
|
||||
;; Created: 27 Apr 2004
|
||||
@ -84,7 +84,7 @@ MODES can be a symbol or a list of symbols.
|
||||
FUNCTION does not have arguments."
|
||||
(setq modes (ensure-list modes))
|
||||
(mode-local-map-file-buffers
|
||||
function (lambda () (apply #'derived-mode-p modes))))
|
||||
function (lambda () (derived-mode-p modes))))
|
||||
|
||||
;;; Hook machinery
|
||||
;;
|
||||
|
@ -211,7 +211,7 @@ non-nil.")
|
||||
(when which-function-mode
|
||||
(unless (local-variable-p 'which-func-mode)
|
||||
(setq which-func-mode (or (eq which-func-modes t)
|
||||
(apply #'derived-mode-p which-func-modes)))
|
||||
(derived-mode-p which-func-modes)))
|
||||
(setq which-func--use-mode-line
|
||||
(member which-func-display '(mode mode-and-header)))
|
||||
(setq which-func--use-header-line
|
||||
@ -239,7 +239,7 @@ It creates the Imenu index for the buffer, if necessary."
|
||||
|
||||
(condition-case err
|
||||
(if (and which-func-mode
|
||||
(not (apply #'derived-mode-p which-func-non-auto-modes))
|
||||
(not (derived-mode-p which-func-non-auto-modes))
|
||||
(or (null which-func-maxout)
|
||||
(< buffer-saved-size which-func-maxout)
|
||||
(= which-func-maxout 0)))
|
||||
|
Loading…
Reference in New Issue
Block a user