summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
Commit message (Collapse)AuthorAge
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* Revert "Allow commenting out white space lines in latex-mode"Lars Ingebrigtsen2022-05-31
| | | | | | This reverts commit 0870ebb3cbfcb097d85eea5eacaf992dd88ed204. This was the wrong way to try to fix this -- see bug#55716.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
|
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-16
|
* lisp/newcomment.el: Uncommenting with whitespace `comment-continue'Christophe Troestler2021-08-27
| | | | | | | * lisp/newcomment.el (uncomment-region-default-1): Make all-whitespace `comment-continue' work (bug#50226). Copyright-paperwork-exempt: yes
* Don't shorten comment padding if the padding isn't spacesLars Ingebrigtsen2021-07-18
| | | | | | * lisp/newcomment.el (comment-padright): Don't shorten non-space padding (bug#6822). (comment-padleft): Ditto.
* * lisp/newcomment.el: Allow 'comment-continue' with whitespace (bug#47167)Juri Linkov2021-03-18
| | | | | * lisp/newcomment.el (comment-region-default-1): Still use 'comment-continue' as a string with whitespace even when 'comment-padright' returns nil.
* Fix numerical `comment-padding' valueLars Ingebrigtsen2021-01-28
| | | | | * lisp/newcomment.el (comment-padright): Allow using a number for `comment-padding', like the doc string says (bug#40056).
* Allow commenting out white space lines in latex-modeLars Ingebrigtsen2021-01-28
| | | | | | | | * lisp/newcomment.el (comment-region-default-1): Allow commenting out whitespace-only regions (bug#41793). * lisp/textmodes/tex-mode.el (latex--comment-region): Use it. (latex-mode): Set a comment style shim.
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Prefer setq-local in newcomment.elStefan Kangas2020-12-08
| | | | | * lisp/newcomment.el (comment-inline-offset) (comment-normalize-vars): Prefer setq-local.
* Make the invocation of combine-change-calls in comment-region validAlan Mackenzie2020-11-15
| | | | | | | | | This fixes bug #44581. The problem was that whitespace outside of the (BEG END) region was being deleted, and this made the invocation of combine-change-calls with (BEG END) invalid. * lisp/newcomment.el (comment-region-default): Amend the second argument to combine-change-calls.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Doc clarification in two comment-* functionsLars Ingebrigtsen2019-08-17
| | | | | * lisp/newcomment.el (comment-padright, comment-padleft): Note that `comment-normalize-vars' must be called first (bug#11944).
* Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"Stefan Monnier2019-06-26
| | | | This reverts commit 698ff554ac2699ec48fefc85a1307cbc4a183b0d.
* * lisp/calc/calc-ext.el (math-scalarp): Fix typoStefan Monnier2019-06-26
|
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-19
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* Make uncomment-region remove obtrusive spaces before tabs.Alan Mackenzie2019-05-10
| | | | | | | | These spaces were typically inserted earlier by comment-region. This patch makes these two complementary functions closer to inverses. * lisp/newcomment.el (uncomment-region-default-1): Remove spaces before a tab where the comment opener has just been removed.
* Fix comment-empty-lines docstring (bug#35152)Basil L. Contovounesios2019-04-04
| | | | | * lisp/newcomment.el (comment-empty-lines): Consistently use US commas in docstring. Fix indentation of and typo in custom :type.
* Merge from origin/emacs-26Paul Eggert2018-12-31
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-01
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Merge from origin/emacs-26Glenn Morris2018-06-02
|\| | | | | | | | | | | | | | | 4cfe531 (origin/emacs-26) Improve ELisp documentation of 'clone-indir... 9089b02 Improve documentation of 'inhibit-message' 6107e12 Improve documentation of comment styles fb45125 Documentation improvements in newcomment.el 641c94c Imp[rove documentation of 'with-silent-modifications'
| * Documentation improvements in newcomment.elEli Zaretskii2018-06-02
| | | | | | | | | | * lisp/newcomment.el (uncomment-region) (uncomment-region-default): Doc fixes. (Bug#31615)
* | Put combine-change-calls around comment-region and uncomment-regionAlan Mackenzie2018-04-03
| | | | | | | | | | | | | | | | | | * lisp/newcomment.el (comment-combine-change-calls): New buffer local variable. (uncomment-region-default-1, comment-region-default-1): Functions renamed from uncomment-region-default and comment-region-default. (uncomment-region-default, comment-region-default): New functions, which call the above either enclosed in combine-change-calls or not.
* | Merge from origin/emacs-26Paul Eggert2018-01-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63b04c11d5 Fix copyright years by hand 5c7dd8a783 Update copyright year to 2018 220a9ecba1 Merge from Gnulib 312c565566 Don't add empty keyboard macro to macro ring (Bug#24992) 39ca289a7a Allow customization of decoding of "man" command f8240815ea * etc/NEWS: Add security consideration note on passphrase ... 0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ... acd289c5a4 Fix problems with indexing in User manual b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh... e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846 81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ... 7175496d7a Fix doc string of 'enable-recursive-minibuffers' 5b38406491 Fix documentation of delsel and of killing text # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex
| * Update copyright year to 2018Paul Eggert2018-01-01
| | | | | | | | Run admin/update-copyright.
* | Merge from origin/emacs-26Paul Eggert2017-11-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 255ba01148 Fix handling of nil PRED2 arg for completion-table-with-pr... 949b70a7d8 ; Minor comment copyedit in window.c 20f9bf30f0 Describe Lao rendering problem 3d61657694 Fix docstring of arabic-shaper-ZWNJ-handling db949166ec Handle single-line comments correctly (Bug#26049) 795bb233a5 * test/lisp/net/tramp-tests.el (tramp-test16-file-expand-w... ba00ea7d0d * etc/PROBLEMS: Add URL to relevant issues for xterm+evil bug 4a6015811e ; In text.texi fix typo spotted by Štěpán Němec 93cd8415b2 Document new treatment of 'comment-auto-fill-only-comments' ca2d94ba61 Do not load Tramp unless `tramp-mode' is non-nil 709478eaa8 Prefer `customize-set-variable' in tramp.texi 5d36f2227f Fix last change in hscroll_window_tree 72d07d1950 Ediff: add some missing documentation 18af404ef3 Support python virtualenv on w32 (Bug#24464) efd0371c23 Improve dired deletion error handling (Bug#28797) 5d744e032f Don't replace user input when completion prefix is empty (... ec6cf35c5f ; Describe xt-mouse problems with Evil mode c572e1f329 Return non-nil from gnutls-available-p under GnuTLS 2.x a2cc6d74c5 Fix Flymake help-echo functions across windows (bug#29142) 58bb3462ee Add tests for Flymake backends for Ruby and Perl 58e742b21d Add a Flymake backend for Perl 9dee764165 Add a Flymake backend for Ruby 3ad712ebc9 Add a Flymake backend for Python (bug#28808) 8db2b3a79b Allow "%" in Tramp host names 8c50842790 ; Fix typo in test/file-organization.org 00fa4449cd ; Fix typo 918a2dda07 Use hybrid malloc for FreeBSD (Bug#28308) 725ab635d9 Add html-, mhtml- and python-mode support to semantic symref 369da28702 Improve documentation of 'window-scroll-functions' 93818eed8a Fix subtle problems in tabulated-list-mode with line numbers 1f1de8e872 Make gdb-non-stop-setting default to nil on MS-Windows 680e8e119b Fix gdb-mi prompt after "attach PID" command ff33074546 Fix doc string of 'window-configuration-change-hook' 787b75ad71 Improve documentation of window hooks d9be8704ae Fix hscroll suspension after cursor motion 6f43d29d29 ; * CONTRIBUTE, admin/make-tarball.txt: Doc tweaks re 'ema... a0d30d6369 Introduce a function to CC Mode which displays the current... 383abc8898 ; Fix some comment typos b02c2714c3 Fix typos in ediff-wind.el 4f38bdec74 Examine tex-chktex--process in the correct buffer 94b490529a * nt/INSTALL.W64: Update to current mingw64 install instru... c25113d4ac Don't resignal errors in flymake-diag-region e950f329c0 New xref-quit-and-goto-xref command bound to TAB (bug#28814) 5d34e1b288 Allow split-window-sensibly to split threshold in further ... 2a973edeac Honor window-switching intents in xref-find-definitions (b... 78e9065e9f * lisp/emacs-lisp/generator.el (iter-do): Add a debug decl... caa63cc96c * lisp/progmodes/flymake.el (flymake-start): Fix dead buff... 9f4f130b79 Fix buffer name comparison in async shell-command # Conflicts: # etc/NEWS # lisp/vc/ediff-wind.el
| * Handle single-line comments correctly (Bug#26049)Antonin Houska2017-11-06
| | | | | | | | | | | | | | | | | | | | | | * lisp/newcomment.el (comment-region-internal): Previously, the comment text had to contain at least one line break character for the ending extra line to be added. Make the behavior more consistent by looking for end of line instead. (comment-region-internal): Remove trailing white space from the comment's initial line. Copyright-paperwork-exempt: yes
* | * lisp/newcomment.el (comment-search-backward): Obey the docstring (bug#28428)Stefan Monnier2017-09-23
|/
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Fix auto-filling regressionTom Tromey2017-08-09
| | | | | | | | Bug#28003 * lisp/newcomment.el (comment-indent-new-line): Check comment-auto-fill-only-comments. Reverts earlier change. * lisp/simple.el (internal-auto-fill): Call auto-fill-function, not do-auto-fill.
* Respect comment-auto-fill-only-commentsTom Tromey2017-08-05
| | | | | | | | | | | | Respect comment-auto-fill-only-comments when auto-filling and a comment syntax is defined. * lisp/newcomment.el (comment-indent-new-line): Do not check comment-auto-fill-only-comments. * lisp/simple.el (internal-auto-fill): New defun. * src/cmds.c (internal_self_insert): Call Qinternal_auto_fill, not auto_fill_function. (syms_of_cmds): Define Qinternal_auto_fill.
* Allow comment-indent-functions to specify exact indentation (Bug#385)Noam Postavsky2017-07-05
| | | | | | | | | | | * lisp/newcomment.el (comment-choose-indent): Interpret a cons of two integers as indicating a range of acceptable indentation. (comment-indent): Don't apply `comment-inline-offset', `comment-choose-indent' already does that. (comment-indent-function): * doc/emacs/programs.texi (Options for Comments): Document new acceptable return values. * etc/NEWS: Announce it.
* Fix infloop in uncomment-region-default (Bug#27112)Noam Postavsky2017-07-04
| | | | | | | | When `comment-continue' has only blanks, `comment-padright' produces a regexp that matches the empty string, so `uncomment-region-default' will loop infinitely. * lisp/newcomment.el (comment-padright): Only return a regexp if STR has nonblank characters.
* Test comment-multi-line = nil auto fill case tooNoam Postavsky2017-02-14
| | | | | | | | * test/lisp/progmodes/js-tests.el (js-mode-auto-fill): Test with `comment-multi-line' both nil and non-nil. * lisp/newcomment.el (comment-multi-line): Mark safe if it's a boolean. * etc/NEWS: Mention that `js-mode' now sets `comment-multi-line'.
* Update copyright year to 2017Paul Eggert2016-12-31
| | | | Run admin/update-copyright.
* In comment-dwim with style `extra-line', respect indent-tabs-mode.Alan Mackenzie2016-01-15
| | | | | | | This fixes bug #22369. * lisp/newcomment.el (comment-make-bol-ws): New function. (comment-make-extra-lines): Use new function instead of a crude `make-string'.
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.
* ; Implement Stefan's feedback on last two commitsIvan Andrus2015-09-23
|
* Allow major-modes full control over quoting nested commentsIvan Andrus2015-09-23
| | | | | | * newcomment.el (comment-quote-nested-function): New variable. (comment-quote-nested-default): New function. (comment-quote-nested): Use `comment-quote-nested-function'.
* * prolog.el: Fix indentation of empty lineStefan Monnier2015-09-22
| | | | | | | | | | | | | | | | | * lisp/emacs-lisp/smie.el (smie-rules-function): Document new `empty-line-token' element. (smie-indent-empty-line): New function. (smie-indent-functions): Add it. * lisp/progmodes/prolog.el (prolog-smie-rules): Fix :list-intro behavior and use the new `empty-line-token' element (bug#21526). (prolog-mode-variables): Fix comment-start-skip setting to match comment-start. * test/indent/prolog.prolog: Add nested indentation tests. * lisp/newcomment.el (comment-normalize-vars): Fix default value of comment-start-skip not to misuse submatch 1.
* * lisp/newcomment.el (comment-dwim): Use `use-region-p'Zachary Kanfer2015-09-01
| | | | | | When the region is active, but is empty (length 0), act as though the region was not active; that is, put a comment at the end of the line. (Bug#21119)
* Prefer directed to neutral quotesPaul Eggert2015-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer directed to neutral quotes in docstings and diagnostics. In docstrings, escape apostrophes that would otherwise be translated to curved quotes using the newer, simpler rules. * admin/unidata/unidata-gen.el (unidata-gen-table): * lisp/align.el (align-region): * lisp/allout.el (allout-mode, allout-solicit-alternate-bullet): * lisp/bookmark.el (bookmark-default-annotation-text): * lisp/calc/calc-aent.el (math-read-if, math-read-factor): * lisp/calc/calc-lang.el (math-read-giac-subscr) (math-read-math-subscr): * lisp/calc/calc-misc.el (report-calc-bug): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-read-parse-table-part): * lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules): * lisp/cedet/semantic/complete.el (semantic-displayor-show-request): * lisp/dabbrev.el (dabbrev-expand): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/elint.el (elint-get-top-forms): * lisp/emacs-lisp/lisp-mnt.el (lm-verify): * lisp/emulation/viper-cmd.el (viper-toggle-search-style): * lisp/erc/erc-button.el (erc-nick-popup): * lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login): * lisp/eshell/em-dirs.el (eshell/cd): * lisp/eshell/em-glob.el (eshell-glob-regexp): * lisp/eshell/em-pred.el (eshell-parse-modifiers): * lisp/eshell/esh-arg.el (eshell-parse-arguments): * lisp/eshell/esh-opt.el (eshell-show-usage): * lisp/files-x.el (modify-file-local-variable): * lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer) (filesets-update-pre010505): * lisp/find-cmd.el (find-generic, find-to-string): * lisp/gnus/auth-source.el (auth-source-netrc-parse-entries): * lisp/gnus/gnus-agent.el (gnus-agent-check-overview-buffer) (gnus-agent-fetch-headers): * lisp/gnus/gnus-int.el (gnus-start-news-server): * lisp/gnus/gnus-registry.el: (gnus-registry--split-fancy-with-parent-internal): * lisp/gnus/gnus-score.el (gnus-summary-increase-score): * lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): * lisp/gnus/gnus-topic.el (gnus-topic-rename): * lisp/gnus/legacy-gnus-agent.el (gnus-agent-unlist-expire-days): * lisp/gnus/nnmairix.el (nnmairix-widget-create-query): * lisp/gnus/spam.el (spam-check-blackholes): * lisp/mail/feedmail.el (feedmail-run-the-queue): * lisp/mpc.el (mpc-playlist-rename): * lisp/net/ange-ftp.el (ange-ftp-shell-command): * lisp/net/mairix.el (mairix-widget-create-query): * lisp/net/tramp-cache.el: * lisp/obsolete/otodo-mode.el (todo-more-important-p): * lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): * lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region): * lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region): * lisp/org/ob-core.el (org-babel-goto-named-src-block) (org-babel-goto-named-result): * lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap): * lisp/org/ob-ref.el (org-babel-ref-resolve): * lisp/org/org-agenda.el (org-agenda-prepare): * lisp/org/org-bibtex.el (org-bibtex-fields): * lisp/org/org-clock.el (org-clock-notify-once-if-expired) (org-clock-resolve): * lisp/org/org-feed.el (org-feed-parse-atom-entry): * lisp/org/org-habit.el (org-habit-parse-todo): * lisp/org/org-mouse.el (org-mouse-popup-global-menu) (org-mouse-context-menu): * lisp/org/org-table.el (org-table-edit-formulas): * lisp/org/ox.el (org-export-async-start): * lisp/play/dunnet.el (dun-score, dun-help, dun-endgame-question) (dun-rooms, dun-endgame-questions): * lisp/progmodes/ada-mode.el (ada-goto-matching-start): * lisp/progmodes/ada-xref.el (ada-find-executable): * lisp/progmodes/antlr-mode.el (antlr-options-alists): * lisp/progmodes/flymake.el (flymake-parse-err-lines) (flymake-start-syntax-check-process): * lisp/progmodes/python.el (python-define-auxiliary-skeleton): * lisp/progmodes/sql.el (sql-comint): * lisp/progmodes/verilog-mode.el (verilog-load-file-at-point): * lisp/server.el (server-get-auth-key): * lisp/subr.el (version-to-list): * lisp/textmodes/reftex-ref.el (reftex-label): * lisp/textmodes/reftex-toc.el (reftex-toc-rename-label): * lisp/vc/ediff-diff.el (ediff-same-contents): * lisp/vc/vc-cvs.el (vc-cvs-mode-line-string): * test/automated/tramp-tests.el (tramp-test33-asynchronous-requests): Use directed rather than neutral quotes in diagnostics.
* newcomment.el (comment-line): Fix missing paren.Artur Malabarba2015-02-08
|
* newcomment.el (comment-line): New command on C-x C-;.Artur Malabarba2015-02-08
|
* Update copyright year to 2015Paul Eggert2015-01-01
| | | | Run admin/update-copyright.
* * lisp/newcomment.el (comment-indent-new-line): Sink code where it's used.Stefan Monnier2014-04-10
| | | | | Reuse the previous comment's indentation unconditionally if it's on its own line.
* Further tweaks for comment-start-skip behaviorDmitry Gutov2014-03-18
| | | | | | | | | | | * lisp/newcomment.el (comment-normalize-vars): Only add escaping check to `comment-start-skip' if not `comment-use-syntax'. (comment-beginning): Use `narrow-to-region' instead of moving back one character. (http://lists.gnu.org/archive/html/emacs-devel/2014-03/msg00488.html) (comment-start-skip): Update the docstring. Fixes: debbugs:16971
* Restore compatibility with legacy comment-start-skip valuesDmitry Gutov2014-03-17
| | | | | | | * lisp/newcomment.el (comment-beginning): If `comment-start-skip' doesn't match, move back one char and try again. Fixes: debbugs:16971
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-01
|