[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master bf976ca7436 1/2: Allow lambdas for 'flymake-cc-command'
From: |
Eli Zaretskii |
Subject: |
master bf976ca7436 1/2: Allow lambdas for 'flymake-cc-command' |
Date: |
Sat, 7 Dec 2024 07:44:01 -0500 (EST) |
branch: master
commit bf976ca7436b620ac33f00fa12317038ab387e00
Author: Pengji Zhang <me@pengjiz.com>
Commit: Eli Zaretskii <eliz@gnu.org>
Allow lambdas for 'flymake-cc-command'
* lisp/progmodes/flymake-cc.el (flymake-cc-command): Use
customization type 'function' instead of 'symbol' to allow
other callable objects in addition to named functions, and
update the doc string accordingly.
(flymake-cc): Use 'functionp' to check if 'flymake-cc-command'
is callable. (Bug#74378)
---
lisp/progmodes/flymake-cc.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/progmodes/flymake-cc.el b/lisp/progmodes/flymake-cc.el
index 60e7da5d617..79557c9fbe4 100644
--- a/lisp/progmodes/flymake-cc.el
+++ b/lisp/progmodes/flymake-cc.el
@@ -28,17 +28,17 @@
(require 'cl-lib)
-(defcustom flymake-cc-command 'flymake-cc-use-special-make-target
+(defcustom flymake-cc-command #'flymake-cc-use-special-make-target
"Command used by the `flymake-cc' backend.
-A list of strings, or a symbol naming a function that produces one
-such list when called with no arguments in the buffer where the
-variable `flymake-mode' is active.
+A list of strings, or a function that produces one such list when called
+with no arguments in the buffer where the variable `flymake-mode' is
+active.
The command should invoke a GNU-style compiler that checks the
syntax of a (Obj)C(++) program passed to it via its standard
input and prints the result on its standard output."
:type '(choice
- (symbol :tag "Function")
+ (function :tag "Function")
(repeat :tag "Command(s)" string))
:version "27.1"
:group 'flymake-cc)
@@ -128,7 +128,7 @@ REPORT-FN is Flymake's callback."
(make-process
:name "gcc-flymake"
:buffer (generate-new-buffer "*gcc-flymake*")
- :command (if (symbolp flymake-cc-command)
+ :command (if (functionp flymake-cc-command)
(funcall flymake-cc-command)
flymake-cc-command)
:noquery t :connection-type 'pipe