branch: elpa/d-mode
commit 02733b04e983eae52ec50501eecfa2de0984417b
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>

    Remove some redundant progns
---
 d-mode.el | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/d-mode.el b/d-mode.el
index e189998..24f081a 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
 ;; Maintainer:  Russel Winder <[email protected]>
 ;;              Vladimir Panteleev <[email protected]>
 ;; Created:  March 2007
-;; Version:  201909091517
+;; Version:  201909091520
 ;; Keywords:  D programming language emacs cc-mode
 ;; Package-Requires: ((emacs "25.1"))
 
@@ -849,13 +849,12 @@ Each list item should be a regexp matching a single 
identifier."
   "Advice function for fixing cc-mode indentation in certain D constructs."
   (if (not (c-major-mode-is 'd-mode))
       (apply orig-fun args)
-    (progn
-      (add-function :around (symbol-function 'looking-at)
-                    #'d-special-case-looking-at)
-      (unwind-protect
-          (apply orig-fun args)
-        (remove-function (symbol-function 'looking-at)
-                         #'d-special-case-looking-at)))))
+    (add-function :around (symbol-function 'looking-at)
+                 #'d-special-case-looking-at)
+    (unwind-protect
+       (apply orig-fun args)
+      (remove-function (symbol-function 'looking-at)
+                      #'d-special-case-looking-at))))
 
 (advice-add 'c-add-stmt-syntax :around #'d-around--c-add-stmt-syntax)
 
@@ -919,14 +918,12 @@ Each list item should be a regexp matching a single 
identifier."
   "Advice function for fixing cc-mode handling of D constructors."
   (if (not (c-major-mode-is 'd-mode))
       (apply orig-fun args)
-    (progn
-      (add-function :around (symbol-function 'looking-at)
-                   #'d-special-case-looking-at-2)
-      (unwind-protect
-         (apply orig-fun args)
-       (remove-function (symbol-function 'looking-at)
-                        #'d-special-case-looking-at-2)
-       ))))
+    (add-function :around (symbol-function 'looking-at)
+                 #'d-special-case-looking-at-2)
+    (unwind-protect
+       (apply orig-fun args)
+      (remove-function (symbol-function 'looking-at)
+                      #'d-special-case-looking-at-2))))
 
 (advice-add 'c-font-lock-declarations :around 
#'d-around--c-font-lock-declarations)
 

Reply via email to