# HG changeset patch # User Thien-Thi Nguyen # Date 1182500040 0 # Node ID a0461babeddfd91c26aa5d47f0f0882b205d9bf8 # Parent ed157fbce08b23738e9e4ac21308b4e0bdf53c0f (hs-hide-comment-region): Use line-end-position. (hs-hide-block-at-point, hs-show-block): Likewise. diff -r ed157fbce08b -r a0461babeddf lisp/progmodes/hideshow.el --- a/lisp/progmodes/hideshow.el Fri Jun 22 08:03:38 2007 +0000 +++ b/lisp/progmodes/hideshow.el Fri Jun 22 08:14:00 2007 +0000 @@ -508,8 +508,8 @@ (defun hs-hide-comment-region (beg end &optional repos-end) "Hide a region from BEG to END, marking it as a comment. Optional arg REPOS-END means reposition at end." - (let ((beg-eol (progn (goto-char beg) (end-of-line) (point))) - (end-eol (progn (goto-char end) (end-of-line) (point)))) + (let ((beg-eol (progn (goto-char beg) (line-end-position))) + (end-eol (progn (goto-char end) (line-end-position)))) (hs-discard-overlays beg-eol end-eol) (hs-make-overlay beg-eol end-eol 'comment beg end)) (goto-char (if repos-end end beg))) @@ -536,8 +536,7 @@ 'identity) pure-p)) ;; whatever the adjustment, we move to eol - (end-of-line) - (point))) + (line-end-position))) (q ;; `q' is the point at the end of the block (progn (hs-forward-sexp mdata 1) @@ -806,7 +805,7 @@ (hs-life-goes-on (or ;; first see if we have something at the end of the line - (let ((ov (hs-overlay-at (save-excursion (end-of-line) (point)))) + (let ((ov (hs-overlay-at (line-end-position))) (here (point))) (when ov (goto-char