emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/d-mode 38ddb5a 076/346: Merge pull request #41 from dmakar


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode 38ddb5a 076/346: Merge pull request #41 from dmakarov/master
Date: Sun, 29 Aug 2021 11:00:06 -0400 (EDT)

branch: elpa/d-mode
commit 38ddb5a776e5c471af3ad3111030ba3d3bf8bb06
Merge: 2b0b84f 075c3e7
Author: Russel Winder <russel@winder.org.uk>
Commit: Russel Winder <russel@winder.org.uk>

    Merge pull request #41 from dmakarov/master
    
    This improves the indentation of else version and else debug statements, 
issue #39
    
    Thanks for sending this pull request in. I am going to take a small risk in 
merging this without fully testing it myself. If we find a problem we can 
always back out of the change.
---
 d-mode.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/d-mode.el b/d-mode.el
index d2a9950..ac613d8 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -188,7 +188,7 @@ operators."
 ;; Built-in basic types
 (c-lang-defconst c-primitive-type-kwds
   d '("bit" "bool" "byte" "ubyte" "char" "delegate" "double" "float"
-      "function" "int" "long" "ubyte" "short" "uint" "ulong" "ushort"
+      "function" "int" "long" "short" "uint" "ulong" "ushort"
       "cent" "ucent" "real" "ireal" "ifloat" "creal" "cfloat" "cdouble"
       "wchar" "dchar" "void" "string" "wstring" "dstring"))
 
@@ -458,11 +458,12 @@ operators."
 ;;;Workaround for special case of 'else static if' not being handled properly
 (defun d-special-case-looking-at (oldfun &rest args)
   (let ((rxp (car args)))
-    (if (and (stringp rxp)
-           (string= rxp "if\\>[^_]"))
-      (or (apply oldfun '("static\\>[^_]"))
-          (apply oldfun args))
-    (apply oldfun args))))
+    (if (and (stringp rxp) (string= rxp "if\\>[^_]"))
+        (or (apply oldfun '("static\\>[^_]"))
+            (apply oldfun '("version\\>[^_]"))
+            (apply oldfun '("debug\\>[^_]"))
+            (apply oldfun args))
+      (apply oldfun args))))
 
 (defadvice c-add-stmt-syntax (around my-c-add-stmt-syntax-wrapper activate)
   (if (not (string= major-mode "d-mode"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]