branch: elpa/d-mode
commit 830a070fd56b0dbe9e22d7dd646fb3adff909d24
Merge: 11cda40 b4cbdfc
Author: Russel Winder <[email protected]>
Commit: Russel Winder <[email protected]>
Merge pull request #51 from dmakarov/master
Workaround issue #50.
---
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))