[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 2b48656 285/346: Simplify c-forward-decl-or-cast-1
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 2b48656 285/346: Simplify c-forward-decl-or-cast-1 advice |
Date: |
Sun, 29 Aug 2021 11:00:46 -0400 (EDT) |
branch: elpa/d-mode
commit 2b486565a5d35652660c660347ba517627036e32
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Simplify c-forward-decl-or-cast-1 advice
---
d-mode.el | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index e36ebfe..23341f1 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <russel@winder.org.uk>
;; Vladimir Panteleev <vladimir@thecybershadow.net>
;; Created: March 2007
-;; Version: 201911111348
+;; Version: 201911111350
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -637,6 +637,18 @@ operators."
(or (eq context 'top) make-top)))))
+(defun d-around--c-forward-decl-or-cast-1 (orig-fun &rest args)
+ ;; checkdoc-params: (orig-fun args)
+ "Advice function for patching D support into cc-mode."
+ (apply
+ (if (c-major-mode-is 'd-mode)
+ #'d-forward-decl-or-cast-1
+ orig-fun)
+ args))
+(advice-add 'c-forward-decl-or-cast-1 :around
#'d-around--c-forward-decl-or-cast-1)
+
+;----------------------------------------------------------------------------
+
(defun d-forward-identifier ()
"Advance point by one D identifier."
(when (and (not (looking-at c-keywords-regexp))
@@ -696,20 +708,6 @@ declaration (or follow the argument list, in case of
functions)."
;;----------------------------------------------------------------------------
-(defun d-around--c-forward-decl-or-cast-1 (orig-fun &rest args)
- ;; checkdoc-params: (orig-fun args)
- "Advice function for fixing cc-mode handling of D constructors."
- (cond
- ((not (c-major-mode-is 'd-mode))
- (apply orig-fun args))
-
- (t
- (apply #'d-forward-decl-or-cast-1 args))))
-
-(advice-add 'c-forward-decl-or-cast-1 :around
#'d-around--c-forward-decl-or-cast-1)
-
-;;----------------------------------------------------------------------------
-
(defun d-around--c-get-fontification-context (orig-fun match-pos &rest args)
;; checkdoc-params: (orig-fun match-pos args)
"Advice function for fixing cc-mode handling of D lambda parameter lists."
- [nongnu] elpa/d-mode 379b00e 144/346: Tweak intro comments a bit, (continued)
- [nongnu] elpa/d-mode 379b00e 144/346: Tweak intro comments a bit, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 7d3edd2 234/346: Add test from issue #94, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 968306a 224/346: Add a test case against the now-removed fontification hack, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8e208b2 232/346: Fix imenu display of functions for imenu-add-to-menubar, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b2c9831 252/346: Make imenu hierarchical, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 69df4a3 254/346: Abbreviate symbol kind in imenu entries, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 12e45cf 258/346: Fix fontification of properties with inferred return type, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 26e7337 253/346: Don't put variables in imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 372c135 274/346: Makefile: Fail on byte-compilation warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a0e95f4 282/346: Remove cl-lib dependency, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2b48656 285/346: Simplify c-forward-decl-or-cast-1 advice,
ELPA Syncer <=
- [nongnu] elpa/d-mode 936944f 294/346: tests: Update test minimal versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fb94d19 295/346: Fix fontification of "xxxmodule.yyy", ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6cbba0e 301/346: Fix fontification of lone protection labels, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2bb5809 304/346: Move conditional compilation to within function bodies, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c29b03d 302/346: .travis.yml: Remove redundant "compile" step, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c8413d2 317/346: tests: Rename fonts_lambda_params to fonts_params, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4586b41 314/346: Fix mis-interpreting parts of some compound statements as lambdas, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e759406 324/346: tests: New testcase, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 50fef92 321/346: Enable Coveralls parallel builds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0522d1c 320/346: Bundle our own undercover.el, ELPA Syncer, 2021/08/29