diff options
| author | Thien-Thi Nguyen | 2007-06-22 08:15:02 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2007-06-22 08:15:02 +0000 |
| commit | 77a2bb53c22415b1619f9266dc098fc278e84422 (patch) | |
| tree | a79ab965354c362002a58e123a361e1300c49f25 | |
| parent | dce39ca8e397ce3dcff9a5f16078959213d2f7c8 (diff) | |
| download | emacs-77a2bb53c22415b1619f9266dc098fc278e84422.tar.gz emacs-77a2bb53c22415b1619f9266dc098fc278e84422.zip | |
(hs-hide-comment-region): Use line-end-position.
(hs-hide-block-at-point, hs-show-block): Likewise.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/hideshow.el | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a38e26710f0..5a7b81d40d1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | (next-error, next-error-internal): Recenter if specified, | 4 | (next-error, next-error-internal): Recenter if specified, |
| 5 | immediately prior to running `next-error-hook'. | 5 | immediately prior to running `next-error-hook'. |
| 6 | 6 | ||
| 7 | * progmodes/hideshow.el (hs-show-block): Use line-end-position. | ||
| 8 | (hs-hide-block-at-point, hs-hide-comment-region): Likewise. | ||
| 9 | |||
| 7 | 2007-06-22 Jay Belanger <jay.p.belanger@gmail.com> | 10 | 2007-06-22 Jay Belanger <jay.p.belanger@gmail.com> |
| 8 | 11 | ||
| 9 | * calc/calc-comb.el (math-small-factorial-table): New variable. | 12 | * calc/calc-comb.el (math-small-factorial-table): New variable. |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index d94f6acf8e1..f39fb477c9e 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -508,8 +508,8 @@ Original match data is restored upon return." | |||
| 508 | (defun hs-hide-comment-region (beg end &optional repos-end) | 508 | (defun hs-hide-comment-region (beg end &optional repos-end) |
| 509 | "Hide a region from BEG to END, marking it as a comment. | 509 | "Hide a region from BEG to END, marking it as a comment. |
| 510 | Optional arg REPOS-END means reposition at end." | 510 | Optional arg REPOS-END means reposition at end." |
| 511 | (let ((beg-eol (progn (goto-char beg) (end-of-line) (point))) | 511 | (let ((beg-eol (progn (goto-char beg) (line-end-position))) |
| 512 | (end-eol (progn (goto-char end) (end-of-line) (point)))) | 512 | (end-eol (progn (goto-char end) (line-end-position)))) |
| 513 | (hs-discard-overlays beg-eol end-eol) | 513 | (hs-discard-overlays beg-eol end-eol) |
| 514 | (hs-make-overlay beg-eol end-eol 'comment beg end)) | 514 | (hs-make-overlay beg-eol end-eol 'comment beg end)) |
| 515 | (goto-char (if repos-end end beg))) | 515 | (goto-char (if repos-end end beg))) |
| @@ -536,8 +536,7 @@ and then further adjusted to be at the end of the line." | |||
| 536 | 'identity) | 536 | 'identity) |
| 537 | pure-p)) | 537 | pure-p)) |
| 538 | ;; whatever the adjustment, we move to eol | 538 | ;; whatever the adjustment, we move to eol |
| 539 | (end-of-line) | 539 | (line-end-position))) |
| 540 | (point))) | ||
| 541 | (q | 540 | (q |
| 542 | ;; `q' is the point at the end of the block | 541 | ;; `q' is the point at the end of the block |
| 543 | (progn (hs-forward-sexp mdata 1) | 542 | (progn (hs-forward-sexp mdata 1) |
| @@ -806,7 +805,7 @@ See documentation for functions `hs-hide-block' and `run-hooks'." | |||
| 806 | (hs-life-goes-on | 805 | (hs-life-goes-on |
| 807 | (or | 806 | (or |
| 808 | ;; first see if we have something at the end of the line | 807 | ;; first see if we have something at the end of the line |
| 809 | (let ((ov (hs-overlay-at (save-excursion (end-of-line) (point)))) | 808 | (let ((ov (hs-overlay-at (line-end-position))) |
| 810 | (here (point))) | 809 | (here (point))) |
| 811 | (when ov | 810 | (when ov |
| 812 | (goto-char | 811 | (goto-char |