diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-02 22:55:42 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-02 22:55:42 -0500 |
commit | e1638fcea7933236bd23cb36421ba124da18b62d (patch) | |
tree | 0c8fc161482be91125ebc3e3c7c2a49e572abd92 /lisp | |
parent | 616f49656e1bebd76c8261eacc3d9259673fbef4 (diff) | |
download | emacs.d-e1638fcea7933236bd23cb36421ba124da18b62d.tar.gz |
Rewrite grep-hide-header
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-files.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/init-files.el b/lisp/init-files.el index d65993a..514cdcc 100644 --- a/lisp/init-files.el +++ b/lisp/init-files.el @@ -62,10 +62,9 @@ entering `ch' is equivalent to `*.[ch]'.") (add-hook 'grep-setup-hook 'km/grep-hide-header) (defun km/grep-hide-header () - (save-excursion - (goto-char (point-min)) - (forward-line 4) - (narrow-to-region (point) (point-max)))) + (let ((beg (save-excursion (goto-char (point-min)) + (line-beginning-position 5)))) + (narrow-to-region beg (point-max)))) (define-prefix-command 'km/file-search-map) (define-key km/file-map "s" 'km/file-search-map) |