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

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

[nongnu] elpa/d-mode cb97457 297/346: Remove another obsolete hack


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode cb97457 297/346: Remove another obsolete hack
Date: Sun, 29 Aug 2021 11:00:48 -0400 (EDT)

branch: elpa/d-mode
commit cb9745785bd02edb0781051dbb7b5ffccbeae5a1
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>

    Remove another obsolete hack
---
 d-mode.el | 43 +------------------------------------------
 1 file changed, 1 insertion(+), 42 deletions(-)

diff --git a/d-mode.el b/d-mode.el
index 1e7f067..c0abe38 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:  201911111704
+;; Version:  201911111723
 ;; Keywords:  D programming language emacs cc-mode
 ;; Package-Requires: ((emacs "25.1"))
 
@@ -894,47 +894,6 @@ Currently handles `-delimited string literals."
 (advice-add 'c-in-knr-argdecl :around #'d-around--c-in-knr-argdecl)
 
 ;;----------------------------------------------------------------------------
-;; We can't include "enum" in `c-typedef-decl-kwds', as that will not
-;; work well with D manifest constants (enum [TYPE] NAME = VALUE).
-;; Instead, omit it from `c-typedef-decl-kwds' (which allows manifest
-;; constants to be fontified properly), and handle actual enumerations
-;; manually by adding fontification of the enum name as a type name to
-;; our version of `c-font-lock-enum-body' below:
-
-(defun d-font-lock-enum-body (limit)
-  "Modified version of `c-font-lock-enum-body' for d-mode." ;; 
checkdoc-params: limit
-  (while (c-syntactic-re-search-forward c-enum-clause-introduction-re limit t)
-    (when (save-excursion
-            (backward-char)
-           (when (c-backward-over-enum-header)
-             ;; Fontify type name here
-             (c-forward-token-2)       ; Over "enum"
-             (c-forward-syntactic-ws)
-             (c-fontify-types-and-refs ((id-start (point)))
-               (when (c-forward-type)
-                 (c-backward-syntactic-ws)
-                 (c-put-font-lock-face id-start
-                                       (point)
-                                       'font-lock-type-face)))
-             t))
-      ;; As in the original `c-font-lock-enum-body', fontify the body
-      ;; (enum members).
-      (c-forward-syntactic-ws)
-      (c-font-lock-declarators limit t nil t)))
-  nil)
-
-(defun d-around--c-font-lock-enum-body (orig-fun &rest args)
-  ;; checkdoc-params: (orig-fun args)
-  "Advice function for fixing fontification for D enums."
-  (apply
-   (if (c-major-mode-is 'd-mode)
-       #'d-font-lock-enum-body
-     orig-fun)
-   args))
-
-(advice-add 'c-font-lock-enum-body :around #'d-around--c-font-lock-enum-body)
-
-;;----------------------------------------------------------------------------
 
 (defun d-forward-type (&optional brace-block-too)
   "Modified version of `c-forward-type' for d-mode." ;; checkdoc-params: 
brace-block-too



reply via email to

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