From 940a1a79372d2f42d217d18ce58512d70ff6bf4e Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Mon, 17 Oct 2016 15:21:00 +0900 Subject: [PATCH 1/2] Fix regexp of auto-mode-alist And use "\'" end of string anchor instead of "$". --- plantuml-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plantuml-mode.el b/plantuml-mode.el index f441274..c6fb52c 100644 --- a/plantuml-mode.el +++ b/plantuml-mode.el @@ -330,7 +330,7 @@ Uses prefix (as PREFIX) to choose where to display it: (message "Making completion list...%s" "done"))))) ;;;###autoload -(add-to-list 'auto-mode-alist '("\\.(plantuml|pum|plantuml|plu)$" . plantuml-mode)) +(add-to-list 'auto-mode-alist '("\\.(plantuml\\|pum\\|plantuml\\|plu)\\'" . plantuml-mode)) ;;;###autoload (define-derived-mode plantuml-mode prog-mode "plantuml" From fff8719b04916c34d4d40c3f272dd213f8c52d73 Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Mon, 17 Oct 2016 15:39:34 +0900 Subject: [PATCH 2/2] Don't call hook two times define-derived-mode macro puts run-hook code after body so it is not necessary to call it manually. --- plantuml-mode.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plantuml-mode.el b/plantuml-mode.el index c6fb52c..b4cb0a9 100644 --- a/plantuml-mode.el +++ b/plantuml-mode.el @@ -344,10 +344,7 @@ Shortcuts Command Name (set (make-local-variable 'comment-end) "'/") (set (make-local-variable 'comment-multi-line) t) (set (make-local-variable 'comment-style) 'extra-line) - (setq font-lock-defaults '((plantuml-font-lock-keywords) nil t)) - - ; Run hooks: - (run-mode-hooks 'plantuml-mode-hook)) + (setq font-lock-defaults '((plantuml-font-lock-keywords) nil t))) (defun plantuml-deprecation-warning () "Warns the user about the deprecation of the `puml-mode' project."