Mercurial > emacs
comparison lisp/newcomment.el @ 109817:012ee86d25c7
* lisp/newcomment.el (comment-add): Move comment to docstring.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 17 Aug 2010 21:38:30 +0200 |
parents | 1d1d5d9bd884 |
children | 280c8ae2476d |
comparison
equal
deleted
inserted
replaced
109816:793aeadb7c43 | 109817:012ee86d25c7 |
---|---|
943 (let ((n (min ,bindent (- (match-end 0) (match-beginning 0) 1)))) | 943 (let ((n (min ,bindent (- (match-end 0) (match-beginning 0) 1)))) |
944 (goto-char (match-beginning 0)) | 944 (goto-char (match-beginning 0)) |
945 (delete-char n) | 945 (delete-char n) |
946 (setq ,bindent (- ,bindent n))))))))))) | 946 (setq ,bindent (- ,bindent n))))))))))) |
947 | 947 |
948 ;; Compute the number of extra comment starter characters | |
949 ;; (extra semicolons in Lisp mode, extra stars in C mode, etc.) | |
950 ;; If ARG is non-nil, just follow ARG. | |
951 ;; If the comment-starter is multi-char, just follow ARG. | |
952 ;; Otherwise obey comment-add, and double it if EXTRA is non-nil. | |
953 (defun comment-add (arg) | 948 (defun comment-add (arg) |
949 "Compute the number of extra comment starter characters | |
950 \(extra semicolons in Lisp mode, extra stars in C mode, etc.) | |
951 If ARG is non-nil, just follow ARG. | |
952 If the comment starter is multi-char, just follow ARG. | |
953 Otherwise obey `comment-add'." | |
954 (if (and (null arg) (= (string-match "[ \t]*\\'" comment-start) 1)) | 954 (if (and (null arg) (= (string-match "[ \t]*\\'" comment-start) 1)) |
955 (* comment-add 1) | 955 (* comment-add 1) |
956 (1- (prefix-numeric-value arg)))) | 956 (1- (prefix-numeric-value arg)))) |
957 | 957 |
958 (defun comment-region-internal (beg end cs ce | 958 (defun comment-region-internal (beg end cs ce |