[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode b4cbdfc 094/346: Workaround issue #50.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode b4cbdfc 094/346: Workaround issue #50. |
Date: |
Sun, 29 Aug 2021 11:00:10 -0400 (EDT) |
branch: elpa/d-mode
commit b4cbdfc9bdae0ee1a7c401f616377d7031bbdf27
Author: Dmitri Makarov <dmakarov@alumni.stanford.edu>
Commit: Dmitri Makarov <dmakarov@alumni.stanford.edu>
Workaround issue #50.
The macros advice-add and add-function were added in Emacs 24.4.
There's no reason to use old style defadvice with add-function. This
change disables special wrappers that handle indenting of 'static if',
'version' and 'debug' constructs in d-mode for versions of Emacs prior
to version 24.4 because the macros that install the wrappers were not
available until the version 24.4.
---
d-mode.el | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index 6b36223..798c6ec 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -488,16 +488,8 @@ operators."
(remove-function (symbol-function 'looking-at)
#'d-special-case-looking-at)))))
-(if (> emacs-major-version 24)
- (advice-add 'c-add-stmt-syntax :around #'d-around--c-add-stmt-syntax)
- (defadvice c-add-stmt-syntax (around d-around--c-add-stmt-syntax activate)
- (if (not (string= major-mode "d-mode"))
- ad-do-it
- (progn
- (add-function :around (symbol-function 'looking-at)
#'d-special-case-looking-at)
- (unwind-protect
- ad-do-it
- (remove-function (symbol-function 'looking-at)
#'d-special-case-looking-at))))))
+(when (version<= "24.4" emacs-version)
+ (advice-add 'c-add-stmt-syntax :around #'d-around--c-add-stmt-syntax))
;;----------------------------------------------------------------------------
;;;###autoload (add-to-list 'auto-mode-alist '("\\.d[i]?\\'" . d-mode))
- [nongnu] elpa/d-mode 2f684db 037/346: Fix deadlock in imenu generator, (continued)
- [nongnu] elpa/d-mode 2f684db 037/346: Fix deadlock in imenu generator, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 701c6be 044/346: use `cc-imenu-init' rather than `setq', ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode bac805f 050/346: Fix backslashes in backquotes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 86930c3 059/346: Rework a sentence of the README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5691b70 069/346: Merge pull request #36 from dmakarov/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8a14ce4 080/346: Fix some compiler warnings., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 79940f2 085/346: Cleanup and fix test error reporting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fbd1f8b 089/346: Merge pull request #44 from snosov1/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e19d704 090/346: Closes #21., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a927264 092/346: Allow tests to specify lisp code and expected output., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b4cbdfc 094/346: Workaround issue #50.,
ELPA Syncer <=
- [nongnu] elpa/d-mode 3e80976 097/346: recognize deprecation warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6323cd4 098/346: Recognize postfix @-keywords in function declarations for imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 600c70b 108/346: Merge pull request #65 from CyberShadow/pull-20160329-054927, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 3e73378 112/346: Update the badges/shields in the README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a99d127 054/346: Fix keywords list construction to include doc-comment keywords., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f487a71 058/346: Add the function to support alignment of multi-line fluent API using expressions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 05cd7b9 038/346: Fix classes with inherit lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 27e7c62 041/346: Merge pull request #14 from finalpatch/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 011d0cf 043/346: Merge pull request #17 from nordlow/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a612105 052/346: Add (require 'cl) as per Issue #23., ELPA Syncer, 2021/08/29