summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
AgeCommit message (Collapse)Author
2022-01-01; Add 2022 to copyright years.Eli Zaretskii
2021-09-16; Minor stylistic fixes found by checkdocStefan Kangas
2021-08-27lisp/newcomment.el: Uncommenting with whitespace `comment-continue'Christophe Troestler
* lisp/newcomment.el (uncomment-region-default-1): Make all-whitespace `comment-continue' work (bug#50226). Copyright-paperwork-exempt: yes
2021-07-18Don't shorten comment padding if the padding isn't spacesLars Ingebrigtsen
* lisp/newcomment.el (comment-padright): Don't shorten non-space padding (bug#6822). (comment-padleft): Ditto.
2021-03-18* lisp/newcomment.el: Allow 'comment-continue' with whitespace (bug#47167)Juri Linkov
* lisp/newcomment.el (comment-region-default-1): Still use 'comment-continue' as a string with whitespace even when 'comment-padright' returns nil.
2021-01-28Fix numerical `comment-padding' valueLars Ingebrigtsen
* lisp/newcomment.el (comment-padright): Allow using a number for `comment-padding', like the doc string says (bug#40056).
2021-01-28Allow commenting out white space lines in latex-modeLars Ingebrigtsen
* 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.
2021-01-01Update copyright year to 2021Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2020-12-08Prefer setq-local in newcomment.elStefan Kangas
* lisp/newcomment.el (comment-inline-offset) (comment-normalize-vars): Prefer setq-local.
2020-11-15Make the invocation of combine-change-calls in comment-region validAlan Mackenzie
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.
2020-01-01Update copyright year to 2020Paul Eggert
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2019-08-17Doc clarification in two comment-* functionsLars Ingebrigtsen
* lisp/newcomment.el (comment-padright, comment-padleft): Note that `comment-normalize-vars' must be called first (bug#11944).
2019-06-26Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"Stefan Monnier
This reverts commit 698ff554ac2699ec48fefc85a1307cbc4a183b0d.
2019-06-26* lisp/calc/calc-ext.el (math-scalarp): Fix typoStefan Monnier
2019-05-19Fixes for "Maintainer:" and related linesPaul Eggert
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.
2019-05-10Make uncomment-region remove obtrusive spaces before tabs.Alan Mackenzie
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.
2019-04-04Fix comment-empty-lines docstring (bug#35152)Basil L. Contovounesios
* lisp/newcomment.el (comment-empty-lines): Consistently use US commas in docstring. Fix indentation of and typo in custom :type.
2018-12-31Merge from origin/emacs-26Paul Eggert
2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
2019-01-01Update copyright year to 2019Paul Eggert
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2018-06-02Merge from origin/emacs-26Glenn Morris
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'
2018-06-02Documentation improvements in newcomment.elEli Zaretskii
* lisp/newcomment.el (uncomment-region) (uncomment-region-default): Doc fixes. (Bug#31615)
2018-04-03Put combine-change-calls around comment-region and uncomment-regionAlan Mackenzie
* 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.
2018-01-01Merge from origin/emacs-26Paul Eggert
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
2018-01-01Update copyright year to 2018Paul Eggert
Run admin/update-copyright.
2017-11-08Merge from origin/emacs-26Paul Eggert
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
2017-11-06Handle single-line comments correctly (Bug#26049)Antonin Houska
* 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
2017-09-23* lisp/newcomment.el (comment-search-backward): Obey the docstring (bug#28428)Stefan Monnier
2017-09-13Prefer HTTPS to FTP and HTTP in documentationPaul Eggert
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.
2017-08-09Fix auto-filling regressionTom Tromey
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.
2017-08-05Respect comment-auto-fill-only-commentsTom Tromey
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.
2017-07-05Allow comment-indent-functions to specify exact indentation (Bug#385)Noam Postavsky
* 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.
2017-07-04Fix infloop in uncomment-region-default (Bug#27112)Noam Postavsky
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.
2017-02-14Test comment-multi-line = nil auto fill case tooNoam Postavsky
* 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'.
2016-12-31Update copyright year to 2017Paul Eggert
Run admin/update-copyright.
2016-01-15In comment-dwim with style `extra-line', respect indent-tabs-mode.Alan Mackenzie
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'.
2016-01-01Update copyright year to 2016Paul Eggert
Run admin/update-copyright.
2015-09-23; Implement Stefan's feedback on last two commitsIvan Andrus
2015-09-23Allow major-modes full control over quoting nested commentsIvan Andrus
* newcomment.el (comment-quote-nested-function): New variable. (comment-quote-nested-default): New function. (comment-quote-nested): Use `comment-quote-nested-function'.
2015-09-22* prolog.el: Fix indentation of empty lineStefan Monnier
* 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.
2015-09-01* lisp/newcomment.el (comment-dwim): Use `use-region-p'Zachary Kanfer
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)
2015-08-24Prefer directed to neutral quotesPaul Eggert
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.
2015-02-08newcomment.el (comment-line): Fix missing paren.Artur Malabarba
2015-02-08newcomment.el (comment-line): New command on C-x C-;.Artur Malabarba
2015-01-01Update copyright year to 2015Paul Eggert
Run admin/update-copyright.
2014-04-10* lisp/newcomment.el (comment-indent-new-line): Sink code where it's used.Stefan Monnier
Reuse the previous comment's indentation unconditionally if it's on its own line.
2014-03-18Further tweaks for comment-start-skip behaviorDmitry Gutov
* 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
2014-03-17Restore compatibility with legacy comment-start-skip valuesDmitry Gutov
* lisp/newcomment.el (comment-beginning): If `comment-start-skip' doesn't match, move back one char and try again. Fixes: debbugs:16971
2014-01-01Update copyright year to 2014 by running admin/update-copyright.Paul Eggert
2013-12-27Misc small custom fixesGlenn Morris
The value of defcustom's const should not be quoted! * lisp/desktop.el (desktop-restore-in-current-display): * lisp/newcomment.el (comment-empty-lines): * lisp/progmodes/idlwave.el (idlwave-scan-all-buffers-for-routine-info) (idlwave-pad-keyword): * lisp/progmodes/tcl.el (tcl-tab-always-indent): * lisp/textmodes/reftex-vars.el (reftex-index-default-tag): * lisp/elec-pair.el (electric-pair-skip-whitespace): * lisp/progmodes/cfengine.el (cfengine-cf-promises): * lisp/cedet/ede/linux.el (project-linux-build-directory-default) (project-linux-architecture-default): * lisp/erc/erc-button.el (erc-button-alist): * lisp/gnus/auth-source.el (auth-sources): * lisp/gnus/nnmairix.el (nnmairix-propagate-marks-upon-close): * lisp/url/url-history.el (url-history-track): * lisp/url/url-vars.el (url-honor-refresh-requests): Fix custom types. * lisp/net/tls.el (tls-certtool-program): Fix default value.
2013-10-06* lisp/newcomment.el (comment-use-global-state): Change default valueDmitry Gutov
to t, mark obsolete. (comment-beginning): In addition to `comment-to-syntax', check the value of `comment-use-global-state'. Fixes: debbugs:15251