/[emacs]/emacs/lisp/newcomment.el
ViewVC logotype

Diff of /emacs/lisp/newcomment.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.88 by monnier, Fri Nov 4 22:20:12 2005 UTC revision 1.89 by monnier, Sun Nov 20 18:06:05 2005 UTC
# Line 478  Point is assumed to be just at the end o Line 478  Point is assumed to be just at the end o
478    (if (bolp)    (if (bolp)
479        ;; comment-end = ""        ;; comment-end = ""
480        (progn (backward-char) (skip-syntax-backward " "))        (progn (backward-char) (skip-syntax-backward " "))
481      (let ((end (point)))      (cond
482        (beginning-of-line)       ((save-restriction
483        (save-restriction          (beginning-of-line)
484          (narrow-to-region (point) end)          (narrow-to-region (point) end)
485          (if (re-search-forward (concat comment-end-skip "\\'") nil t)          (re-search-forward (concat comment-end-skip "\\'") nil t))
486              (goto-char (match-beginning 0))        (goto-char (match-beginning 0)))
487            ;; comment-end-skip not found probably because it was not set right.       ;; comment-end-skip not found.  Maybe we're at EOB which implicitly
488            ;; Since \\s> should catch the single-char case, we'll blindly       ;; closes the comment.
489            ;; assume we're at the end of a two-char comment-end.       ((eobp) (skip-syntax-backward " "))
490            (goto-char (point-max))       (t
491            (backward-char 2)        ;; else comment-end-skip was not found probably because it was not
492            (skip-chars-backward (string (char-after)))        ;; set right.  Since \\s> should catch the single-char case, we'll
493            (skip-syntax-backward " "))))))        ;; blindly assume we're at the end of a two-char comment-end.
494          (backward-char 2)
495          (skip-chars-backward (string (char-after)))
496          (skip-syntax-backward " ")))))
497    
498  ;;;;  ;;;;
499  ;;;; Commands  ;;;; Commands

Legend:
Removed from v.1.88  
changed lines
  Added in v.1.89

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26