branch: externals/csharp-mode commit 6efd45984ba2491e4d9c4775e4102e8d1fb6c5fc Author: Vasilij Schneidermann <v.schneiderm...@gmail.com> Commit: Vasilij Schneidermann <v.schneiderm...@gmail.com>
Stylistic fixes --- csharp-mode.el | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/csharp-mode.el b/csharp-mode.el index fae6f8b..408cb12 100644 --- a/csharp-mode.el +++ b/csharp-mode.el @@ -4260,25 +4260,22 @@ Key bindings: ;; so I put it afterwards to make it stick. (make-local-variable 'paragraph-separate) - ;;(message "C#: set paragraph-separate") - ;; Speedbar handling - (if (fboundp 'speedbar-add-supported-extension) - (speedbar-add-supported-extension '(".cs"))) ;; idempotent + (when (fboundp 'speedbar-add-supported-extension) + (speedbar-add-supported-extension '(".cs"))) ;; idempotent (c-update-modeline) ;; maybe do imenu scan after hook returns - (if csharp-want-imenu - (progn - ;; There are two ways to do imenu indexing. One is to provide a - ;; function, via `imenu-create-index-function'. The other is to - ;; provide imenu with a list of regexps via - ;; `imenu-generic-expression'; imenu will do a "generic scan" for you. - ;; csharp-mode uses the former method. - ;; - (setq imenu-create-index-function 'csharp-imenu-create-index) - (imenu-add-menubar-index))) + (when csharp-want-imenu + ;; There are two ways to do imenu indexing. One is to provide a + ;; function, via `imenu-create-index-function'. The other is to + ;; provide imenu with a list of regexps via + ;; `imenu-generic-expression'; imenu will do a "generic scan" for you. + ;; csharp-mode uses the former method. + + (setq imenu-create-index-function 'csharp-imenu-create-index) + (imenu-add-menubar-index)) ;; The paragraph-separate variable was getting stomped by ;; other hooks, so it must reside here.