From 2308f44707f27316ac83563928376df29d5835c0 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Sun, 3 Oct 2004 15:36:18 +0000 Subject: [PATCH] comment-beginning: doc-fix and don't choke on unset comment-end-skip when at beginning of comment --- lisp/ChangeLog | 9 +++++++-- lisp/newcomment.el | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd26fb647bc..d80e70510c0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-10-03 Daniel Pfeiffer + + * newcomment.el (comment-beginning): Doc fix and don't choke on + unset `comment-end-skip' when at beginning of comment + 2004-10-02 Dan Nicolaescu * term.el (term-adjust-current-row-cache): Don't allow the current @@ -5,9 +10,9 @@ (term-emulate-terminal): Fix insert mode. Handle tab insertion at the end of the line. Fix scroll down. Add comments. (term-handle-ansi-escape): Don't exceed terminal width when moving - right. + right. (term-scroll-region): Move the cursor after setting the scroll - region. + region. 2004-10-01 Luc Teirlinck diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 120777ab704..5711e7903ad 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -423,7 +423,7 @@ and raises an error or returns nil if NOERROR is non-nil." (defun comment-beginning () "Find the beginning of the enclosing comment. Returns nil if not inside a comment, else moves point and returns -the same as `comment-search-forward'." +the same as `comment-search-backward'." ;; HACK ATTACK! ;; We should really test `in-string-p' but that can be expensive. (unless (eq (get-text-property (point) 'face) 'font-lock-string-face) @@ -435,7 +435,7 @@ the same as `comment-search-forward'." (and ;; For modes where comment-start and comment-end are the same, ;; the search above may have found a `ce' rather than a `cs'. - (or (not (looking-at comment-end-skip)) + (or (if comment-end-skip (not (looking-at comment-end-skip))) ;; Maybe font-lock knows that it's a `cs'? (eq (get-text-property (match-end 0) 'face) 'font-lock-comment-face) -- 2.39.2