1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-26 10:49:33 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
Stefan Monnier
75ed43a6a2 (comment-normalize-vars): Use [ \t] for the trailing
spaces in default comment-start-skip settings rather than \s-.
2001-03-02 20:31:48 +00:00
Stefan Monnier
76a4de0725 (comment-forward): Skip the comment-start before
searching for the comment-end.
2001-02-22 01:48:24 +00:00
Stefan Monnier
c64c05511b Remove useless Version. 2000-12-18 03:17:31 +00:00
Stefan Monnier
adf9c99461 (comment-indent-new-line): Use delete-horizontal-space
(so as to obey the field property in the minibuffer).
2000-12-11 21:41:41 +00:00
Dave Love
39cb51e73b Fix copyright years.
(comment-region, comment-dwim): Doc fix.
2000-12-06 19:54:37 +00:00
Stefan Monnier
053b8d3589 (comment-indent): Save excursion around call to comment-indent-function. 2000-11-29 05:11:09 +00:00
Stefan Monnier
2e1fbba4e5 (comment-indent): Insert comment before calling
comment-indent-function.  Don't insert in column 0.
(comment-dwim): Indent before inserting comment.
2000-11-21 21:31:16 +00:00
Stefan Monnier
bb304a7a29 (comment-indent): Paren typo. 2000-11-14 15:10:02 +00:00
Stefan Monnier
d3fcda2278 (comment-indent-default): Stick \s<\s< to the left
when it follows non-comment text on the line.
2000-11-14 10:04:20 +00:00
Stefan Monnier
fae9994499 (comment-indent-default): Autoload. 2000-10-08 19:07:41 +00:00
Stefan Monnier
87cf842124 (comment-indent):
Delegate to indent-according-to-mode if comment-indent-function returns nil.
(comment-indent-default): New function.
(comment-indent-function): Use it and document the new semantics.
2000-10-05 22:43:22 +00:00
Stefan Monnier
bdbe3a8995 (comment-indent-function): Use 0 for ;;; and %%%.
(comment-indent): Make sure there's a space between code and comment.
Shift comments left to avoid going past fill-column.
2000-09-29 19:11:42 +00:00
Stefan Monnier
27c292d1f3 Remove redundant change-log. 2000-07-06 13:25:31 +00:00
Stefan Monnier
6dcd3806b0 (uncomment-region): Be more careful when skipping
backwards over `=' not to bump into BOBP.
2000-07-06 13:24:28 +00:00
Dave Love
ac87b3a9ed (comment) <defgroup>: Add :version.
(comment-multi-line): Doc fix.
2000-06-20 09:40:36 +00:00
Stefan Monnier
fd9f22d8a4 (comment-indent): Ignore comment-indent-hook. 2000-06-04 22:02:11 +00:00
Stefan Monnier
be83ecb2d7 Add abundant autoload cookies.
(comment-style): Be careful not to depend on runtime data at compile-time.
(comment-indent-hook): Remove.
(comment-indent): Check if comment-indent-hook is bound.
(comment-region): Docstring fix.
2000-05-25 19:05:46 +00:00
Stefan Monnier
3fc5b4e228 (comment-make-extra-lines): Don't use `assert'. 2000-05-23 20:06:10 +00:00
Stefan Monnier
4125ec7e79 (comment-region-internal): Go back to BEG after quoting
the nested comment markers.
2000-05-22 04:24:01 +00:00
Stefan Monnier
9b0d1d6e8d (comment-styles): New `box-multi'.
(comment-normalize-vars): Better default for comment-continue to
avoid whitespace-only continuations.
(comment-search-forward): Always move even in the no-syntax case.
(comment-padright): Only obey N if it's only obeyed for padleft.
(comment-make-extra-lines): Better handling of empty continuations.
Use `=' for the filler if comment-start has only one character.
(uncomment-region): Try handling the special `=' filler.
(comment-region): Allow LINES even if MULTI is nil.
(comment-box): Choose box style based on comment-style.
2000-05-21 00:27:53 +00:00
Stefan Monnier
59a1ce8db6 Fix license text and author.
Move aliases (indent-for-comment, set-comment-column, kill-comment
and indent-new-comment-line) to the beginning of the file.
Get rid of the last few CLisms.
(comment-forward): Avoid decf.
(comment-make-extra-lines): Comment-out asserts.
(comment-with-narrowing): Properly create uninterned symbol.
(comment-region-internal): Comment-out asserts.  Avoid incf and decf.
(comment-indent-new-line): Fix bug where compt could be set but
not comstart.  Set comment-column more carefully.
2000-05-19 15:37:41 +00:00
Stefan Monnier
392f1ef546 (comment-beginning): Handle unclosed comment.
(comment-auto-fill-only-comments): New var.
(comment-indent-new-line): Obey comment-auto-fill-only-comments.
  Align with comment-column rather than previous comment if previous
  comment's indentation is greater than comment-column.
2000-05-17 19:32:32 +00:00
Stefan Monnier
ad679e458a (comment-string-strip): Strip terminating newlines.
(comment-search-forward): Make LIMIT compulsory.
  If an unterminated string (rather than a comment) is found, try again,
  assuming that the region starts inside a string.
(comment-beginning): Make sure we don't move if we find a comment but
  it's not the one we're in.
(comment-enter-backward): Handle the case where comment-end-skip fails.
(comment-indent): Normalize variables and use line-end-position.
(comment-kill): Use line-end-position.
(comment-spill): Remove.
(comment-indent-new-line): Renamed from indent-new-comment-line.
  Cleaned up old commented-out code.
  Reset comment-continue and comment-end before calling comment-indent.
2000-05-16 22:02:37 +00:00
Stefan Monnier
f52154007f (comment-start, comment-start-skip, comment-end): Made `defvar'.
(comment-style): Extract the choice out of comment-styles.
(comment-continue): Just a simple string now.
(comment-normalize-vars): Update for the new comment-continue.
(until, comment-end-quote-re): Removed.
(comment-quote-re, comment-quote-nested): New functions for quoting.
  These quote both the end and the start and also work for single-chars.
(comment-padright): Added lots of comments.
(comment-padleft): Added more comments.  Check comment-end rather than
  STR to determine whether N can be applied or not.
(uncomment-region): Rename BLOCK to BOX.
  Use the new comment-quote-nested.
  Use only one marker and properly set it back to nil.
  Be more picky when eliminating continuation markers.
2000-05-14 00:56:10 +00:00
Stefan Monnier
771c9b9735 (comment-use-syntax): Change maybe' to undecided'.
(comment-quote-nested): New.  Replaces comment-nested.
(comment-add): Turn into a mere defvar or a integer.
(comment-style): Change default to `plain'.
(comment-styles): Rename `plain' to `indent' and create a new plainer `plain'.
(comment-string-reverse): Use nreverse.
(comment-normalize-vars): Change `maybe' to `undecided', add comments.
  Don't infer the setting of comment-nested anymore (the default for
  comment-quote-nested is safe).  Use comment-quote-nested.
(comment-end-quote-re): Use comment-quote-nested.
(comment-search-forward): Obey LIMIT.
(comment-indent): Don't skip forward further past comment-search-forward.
(comment-padleft): Use comment-quote-nested.
(comment-make-extra-lines): Use `cons' rather than `values'.
(comment-region-internal): New arg INDENT.  Use line-end-position.
  Avoid multiple-value-setq.
(comment-region): Follow the new comment-add semantics.
  Don't do box comments any more.
(comment-box): New function.
(comment-dwim): Only do the region stuff is transient-mark-active.
2000-05-13 19:41:08 +00:00
Stefan Monnier
3e569d228e various fixes and gratuitous movements. 1999-12-08 00:19:51 +00:00
Stefan Monnier
2ab98065f3 (comment-style(s)): Replaces comment-extra-lines (and comment-multi-line).
(comment-use-syntax): Whether to use the syntax-table or just the regexps.
(comment-end-skip): To find the end of the text.
...
1999-11-30 16:20:55 +00:00
Stefan Monnier
e8fe7d390d (comment-find): New function.
(indent-for-comment, set-comment-column, kill-comment): use it.
1999-11-29 01:31:47 +00:00
Stefan Monnier
7a0a180a0a (kill-comment): Fixed by rewriting it with syntax-tables rather than regexps
(comment-normalize-vars): Set default (cdr comment-continue)
(comment-end-quote-re): new function taken out of `comment-region-internal'
(uncomment-region): Rewritten using syntax-tables.  Also unquotes
  nested comment-ends and eliminates continuation markers.
(comment-region-internal): Don't create a default for cce.
  Use `comment-end-quote-re'.
1999-11-29 00:49:18 +00:00
Stefan Monnier
aac88001d4 (comment-make-extra-lines): Moved out of comment-region-internal.
(comment-with-narrowing): New macro.  Provides a way to preserve
  indentation inside narrowing.
(comment-region-internal): Add "\n" to close the comment if necessary.
  Correctly handle commenting-out when BEG is not bolp.
1999-11-28 21:33:55 +00:00
Stefan Monnier
83b96b2250 First "working" version:
- uncomment-region doesn't work for some unknown reason
- comment-multi-line allows the use of multi line comments
- comment-extra-lines allows yet another style choice
- comment-add allows to default to `;;'
- comment-region on a comment calls uncomment-region
- C-u C-u comment-region aligns comment end markers
- C-u C-u C-u comment-region puts the comment inside a rectangle
1999-11-28 18:51:06 +00:00