From ff55ada1317d11219c015052b6cd423a56f83cad Mon Sep 17 00:00:00 2001 From: Ravi R Kiran Date: Thu, 27 Nov 2014 14:53:15 -0800 Subject: Commenting fixes Use comment-dwim-2 and do not set comment-style globally in header insertion. diff --git a/ravi-init-appearance.el b/ravi-init-appearance.el index caff195..8c5b173 100644 --- a/ravi-init-appearance.el +++ b/ravi-init-appearance.el @@ -147,6 +147,10 @@ Delete all whitespace on a successive key press." (let ((mark-even-if-inactive transient-mark-mode)) (indent-region (region-beginning) (region-end) nil)))))) +(use-package comment-dwim-2 + :bind (("M-;" . comment-dwim-2)) + :ensure t) + ;; Keep my navigation simple (setq line-move-visual nil) diff --git a/ravi-init-cpp.el b/ravi-init-cpp.el index 53d52ca..62e1563 100644 --- a/ravi-init-cpp.el +++ b/ravi-init-cpp.el @@ -255,9 +255,9 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named (save-excursion (let ((start (point-min)) + (comment-style 'box) (end) ) - (setq comment-style 'box) (goto-char start) (insert (ravi-license-header)) (setq end (point)) @@ -279,9 +279,9 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named (defun ravi-license-insert () (progn (let ((start (point-min)) + (comment-style 'box) (end) ) - (setq comment-style 'box) (goto-char start) (insert (ravi-license-header)) (insert "\n") -- cgit v0.10.1