[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/tuareg cbe70da 5/8: Remove conditional use of add-functio
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/tuareg cbe70da 5/8: Remove conditional use of add-function, available on Emacs ≥ 24.4 |
Date: |
Mon, 13 Sep 2021 17:59:59 -0400 (EDT) |
branch: elpa/tuareg
commit cbe70dad979edb285df0f4c162e98e981d1d6427
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Remove conditional use of add-function, available on Emacs ≥ 24.4
---
tuareg.el | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/tuareg.el b/tuareg.el
index 6fde528..26d372c 100644
--- a/tuareg.el
+++ b/tuareg.el
@@ -3065,14 +3065,6 @@ file outside _build? "))
(message "File in _build. C-x C-q to edit.")
nil))))))
-(defmacro tuareg--eval-when-macrop (f form)
- "Execute FORM but only when F is `fboundp' (because it's a macro).
-If F is not bound yet, then keep the code un-expanded and perform the
-expansion at run-time, if the run-time version of Emacs does know this macro."
- (declare (debug (symbolp body)) (indent 1))
- (if (fboundp f) form ;Macro expanded at compile-time.
- `(if (fboundp ',f) (eval ',form)))) ;Macro expanded at run-time.
-
(defun tuareg--hanging-eolp-advice ()
"Recognize \"fun ..args.. ->\" at EOL as being hanging."
(when (looking-at "fun\\_>")
@@ -3125,13 +3117,12 @@ expansion at run-time, if the run-time version of Emacs
does know this macro."
(smie-setup tuareg-smie-grammar #'tuareg-smie-rules
:forward-token #'tuareg-smie-forward-token
:backward-token #'tuareg-smie-backward-token)
- (tuareg--eval-when-macrop add-function
- (when (boundp 'smie--hanging-eolp-function)
- ;; FIXME: As its name implies, smie--hanging-eolp-function
- ;; is not to be used by packages like us, but SMIE's maintainer
- ;; hasn't provided any alternative so far :-(
- (add-function :before (local 'smie--hanging-eolp-function)
- #'tuareg--hanging-eolp-advice)))
+ (when (boundp 'smie--hanging-eolp-function)
+ ;; FIXME: As its name implies, smie--hanging-eolp-function
+ ;; is not to be used by packages like us, but SMIE's maintainer
+ ;; hasn't provided any alternative so far :-(
+ (add-function :before (local 'smie--hanging-eolp-function)
+ #'tuareg--hanging-eolp-advice))
(add-hook 'smie-indent-functions #'tuareg-smie--args nil t)
(add-hook 'smie-indent-functions #'tuareg-smie--inside-string nil t)
(setq-local add-log-current-defun-function #'tuareg-current-fun-name)
- [nongnu] elpa/tuareg updated (c33222d -> 00faf47), ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg c9bbe95 7/8: Better comment delimiter match using `syntax-ppss', ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 0fd9588 1/8: README: mention NonGNU ELPA, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 9f48840 2/8: README: Remove duplicate bug report URL, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg a156d04 3/8: Faster after comment detection & match comment delimiters, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 50309ae 4/8: Enable to turn off the delimiters matching (show-paren) for comments, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg cbe70da 5/8: Remove conditional use of add-function, available on Emacs ≥ 24.4,
ELPA Syncer <=
- [nongnu] elpa/tuareg fe10533 6/8: Document recent changes, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 00faf47 8/8: Use uniform argument names for :around advice, ELPA Syncer, 2021/09/13