X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/ba8b2c1a39dd75f18543c3fbf46d721f41f8e164..364cd450426cc0f93eada8f00c30000ff2ba22f2:/lisp/elide-head.el diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 03e63b9893..9cd592057d 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el @@ -47,6 +47,7 @@ (defgroup elide-head nil "Eliding copyright headers and the like in source files." + :version "21.1" :prefix "elide-head" :group 'tools) @@ -92,7 +93,7 @@ This is suitable as an entry on `find-file-hooks' or appropriate mode hooks." (when (re-search-forward (caar rest) nil t) (setq beg (point)) (when (re-search-forward (cdar rest) nil t) - (setq end (point) + (setq end (point-marker) rest nil)))) (if rest (setq rest (cdr rest)))) (if (not (and beg end)) @@ -101,10 +102,11 @@ This is suitable as an entry on `find-file-hooks' or appropriate mode hooks." (goto-char beg) (end-of-line) (if (overlayp elide-head-overlay) - (move-overlay elide-head-overlay (point) end) - (setq elide-head-overlay (make-overlay (point) end))) + (move-overlay elide-head-overlay (point-marker) end) + (setq elide-head-overlay (make-overlay (point-marker) end))) (overlay-put elide-head-overlay 'invisible t) (overlay-put elide-head-overlay 'intangible t) + (overlay-put elide-head-overlay 'evaporate t) (overlay-put elide-head-overlay 'after-string "..."))))))) (defun elide-head-show ()