aboutsummaryrefslogtreecommitdiff
path: root/gui/conf/init.el
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-06-08 23:47:46 +0200
committerAdrian Kummerlaender2020-06-08 23:47:46 +0200
commitd292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e (patch)
treedec1a0117676f73e6e28f65f1e9c7166f6249d29 /gui/conf/init.el
parent7dbe910f79c9a698c604a06f511f93882e08d076 (diff)
downloadnixos_home-d292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e.tar
nixos_home-d292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e.tar.gz
nixos_home-d292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e.tar.bz2
nixos_home-d292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e.tar.lz
nixos_home-d292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e.tar.xz
nixos_home-d292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e.tar.zst
nixos_home-d292d28fedd4bc7ab8c3bdff5fcc0ba4534cf21e.zip
Replace custom copyright comment hiding with HideShow mode
Diffstat (limited to 'gui/conf/init.el')
-rw-r--r--gui/conf/init.el16
1 files changed, 2 insertions, 14 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el
index 3142d00..dfc886d 100644
--- a/gui/conf/init.el
+++ b/gui/conf/init.el
@@ -209,17 +209,5 @@
(use-package ag
:ensure t)
-(defun copyright-message-p ()
- "Returns t when the current buffer starts with a Copyright note"
- (save-excursion
- (goto-char (point-min))
- (looking-at "\\s */\\*\\(:?\\s \\|\\*\\)*\\(This file\\|Copyright\\)\\b")))
-
-(defun hide-copyright-note ()
- "Tries to narrow the current buffer so that the copyright comment is hidden"
- (interactive)
- (when (copyright-message-p)
- (save-excursion
- (let* ((start (progn (goto-char (point-min)) (forward-comment (buffer-size)) (point)))
- (end (progn (end-of-buffer) (point))))
- (narrow-to-region start end)))))
+(add-hook 'c-mode-common-hook 'hs-minor-mode t)
+(add-hook 'c-mode-common-hook 'hs-hide-initial-comment-block t)