comparison lisp/newcomment.el @ 34301:7ab80112df37

Fix copyright years. (comment-region, comment-dwim): Doc fix.
author Dave Love <fx@gnu.org>
date Wed, 06 Dec 2000 19:54:37 +0000
parents 3aa61201a0ab
children 1007fb1b5df9
comparison
equal deleted inserted replaced
34300:c7610b751e49 34301:7ab80112df37
1 ;;; newcomment.el --- (un)comment regions of buffers 1 ;;; newcomment.el --- (un)comment regions of buffers
2 2
3 ;; Copyright (C) 1999-2000 Free Software Foundation Inc. 3 ;; Copyright (C) 1999, 2000 Free Software Foundation Inc.
4 4
5 ;; Author: code extracted from Emacs-20's simple.el 5 ;; Author: code extracted from Emacs-20's simple.el
6 ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> 6 ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu>
7 ;; Keywords: comment uncomment 7 ;; Keywords: comment uncomment
8 ;; Version: $Name: $ 8 ;; Version: $Name: $
9 ;; Revision: $Id: newcomment.el,v 1.25 2000/11/21 21:31:16 monnier Exp $ 9 ;; Revision: $Id: newcomment.el,v 1.26 2000/11/29 05:11:01 monnier Exp $
10 10
11 ;; This file is part of GNU Emacs. 11 ;; This file is part of GNU Emacs.
12 12
13 ;; GNU Emacs is free software; you can redistribute it and/or modify 13 ;; GNU Emacs is free software; you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by 14 ;; it under the terms of the GNU General Public License as published by
786 (not (or (eobp) (progn (forward-line) nil)))))))))) 786 (not (or (eobp) (progn (forward-line) nil))))))))))
787 787
788 ;;;###autoload 788 ;;;###autoload
789 (defun comment-region (beg end &optional arg) 789 (defun comment-region (beg end &optional arg)
790 "Comment or uncomment each line in the region. 790 "Comment or uncomment each line in the region.
791 With just \\[universal-prefix] prefix arg, uncomment each line in region BEG..END. 791 With just \\[universal-argument] prefix arg, uncomment each line in region BEG..END.
792 Numeric prefix arg ARG means use ARG comment characters. 792 Numeric prefix arg ARG means use ARG comment characters.
793 If ARG is negative, delete that many comment characters instead. 793 If ARG is negative, delete that many comment characters instead.
794 By default, comments start at the left margin, are terminated on each line, 794 By default, comments start at the left margin, are terminated on each line,
795 even for syntax in which newline does not end the comment and blank lines 795 even for syntax in which newline does not end the comment and blank lines
796 do not get comments. This can be changed with `comment-style'. 796 do not get comments. This can be changed with `comment-style'.
862 862
863 ;;;###autoload 863 ;;;###autoload
864 (defun comment-dwim (arg) 864 (defun comment-dwim (arg)
865 "Call the comment command you want (Do What I Mean). 865 "Call the comment command you want (Do What I Mean).
866 If the region is active and `transient-mark-mode' is on, call 866 If the region is active and `transient-mark-mode' is on, call
867 `comment-region' (unless it only consists in comments, in which 867 `comment-region' (unless it only consists of comments, in which
868 case it calls `uncomment-region'). 868 case it calls `uncomment-region').
869 Else, if the current line is empty, insert a comment and indent it. 869 Else, if the current line is empty, insert a comment and indent it.
870 Else if a prefix ARG is specified, call `comment-kill'. 870 Else if a prefix ARG is specified, call `comment-kill'.
871 Else, call `comment-indent'." 871 Else, call `comment-indent'."
872 (interactive "*P") 872 (interactive "*P")