1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00
Commit Graph

214 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
6a2cc870d2 Revert "Allow commenting out white space lines in latex-mode"
This reverts commit 0870ebb3cb.

This was the wrong way to try to fix this -- see bug#55716.
2022-05-31 20:20:23 +02:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Stefan Kangas
63f419f133 ; Minor stylistic fixes found by checkdoc 2021-09-16 19:37:07 +02:00
Christophe Troestler
0d45ad99da lisp/newcomment.el: Uncommenting with whitespace `comment-continue'
* lisp/newcomment.el (uncomment-region-default-1): Make
all-whitespace `comment-continue' work (bug#50226).

Copyright-paperwork-exempt: yes
2021-08-27 17:15:17 +02:00
Lars Ingebrigtsen
d2f9295a1f Don't shorten comment padding if the padding isn't spaces
* lisp/newcomment.el (comment-padright): Don't shorten non-space
padding (bug#6822).
(comment-padleft): Ditto.
2021-07-18 14:49:48 +02:00
Juri Linkov
5c93063129 * lisp/newcomment.el: Allow 'comment-continue' with whitespace (bug#47167)
* lisp/newcomment.el (comment-region-default-1): Still use 'comment-continue'
as a string with whitespace even when 'comment-padright' returns nil.
2021-03-18 20:01:26 +02:00
Lars Ingebrigtsen
64d4648869 Fix numerical `comment-padding' value
* lisp/newcomment.el (comment-padright): Allow using a number for
`comment-padding', like the doc string says (bug#40056).
2021-01-28 09:57:48 +01:00
Lars Ingebrigtsen
0870ebb3cb Allow commenting out white space lines in latex-mode
* 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-28 07:09:18 +01:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Stefan Kangas
6614b67d9e Prefer setq-local in newcomment.el
* lisp/newcomment.el (comment-inline-offset)
(comment-normalize-vars): Prefer setq-local.
2020-12-08 08:52:42 +01:00
Alan Mackenzie
4ec740866a Make the invocation of combine-change-calls in comment-region valid
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-11-15 13:23:15 +00:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Lars Ingebrigtsen
669599b0f4 Doc clarification in two comment-* functions
* lisp/newcomment.el (comment-padright, comment-padleft): Note
that `comment-normalize-vars' must be called first (bug#11944).
2019-08-17 16:35:59 -07:00
Stefan Monnier
0b4e003766 Revert "* lisp/calc/calc-ext.el (math-scalarp): Fix typo"
This reverts commit 698ff554ac.
2019-06-26 10:24:59 -04:00
Stefan Monnier
698ff554ac * lisp/calc/calc-ext.el (math-scalarp): Fix typo 2019-06-26 10:03:48 -04:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
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-19 21:34:27 -07:00
Alan Mackenzie
a8d17f35a2 Make uncomment-region remove obtrusive spaces before tabs.
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-05-10 07:28:54 +00:00
Basil L. Contovounesios
690c678fb6 Fix comment-empty-lines docstring (bug#35152)
* lisp/newcomment.el (comment-empty-lines): Consistently use US
commas in docstring.  Fix indentation of and typo in custom :type.
2019-04-04 23:41:02 +01:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Glenn Morris
84f992d42e Merge from origin/emacs-26
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-02 10:29:38 -07:00
Eli Zaretskii
fb45125c80 Documentation improvements in newcomment.el
* lisp/newcomment.el (uncomment-region)
(uncomment-region-default): Doc fixes.  (Bug#31615)
2018-06-02 13:43:43 +03:00
Alan Mackenzie
eb0d10d567 Put combine-change-calls around comment-region and uncomment-region
* 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-04-03 16:37:39 +00:00
Paul Eggert
bb267f17f9 Merge from origin/emacs-26
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-01 01:13:04 -08:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
6ee8270594 Merge from origin/emacs-26
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-08 19:22:26 -08:00
Antonin Houska
db949166ec Handle single-line comments correctly (Bug#26049)
* 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-11-06 19:01:19 -05:00
Stefan Monnier
535db535a9 * lisp/newcomment.el (comment-search-backward): Obey the docstring (bug#28428) 2017-09-23 17:06:23 -04:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
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-09-13 15:54:37 -07:00
Tom Tromey
81656add81 Fix auto-filling regression
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-09 16:06:23 -06:00
Tom Tromey
9b463fa864 Respect comment-auto-fill-only-comments
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-08-05 18:31:39 -06:00
Noam Postavsky
e832febfb4 Allow comment-indent-functions to specify exact indentation (Bug#385)
* 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-05 22:52:35 -04:00
Noam Postavsky
2a9d7394e3 Fix infloop in uncomment-region-default (Bug#27112)
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-07-04 20:04:42 -04:00
Noam Postavsky
0a64666288 Test comment-multi-line = nil auto fill case too
* 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'.
2017-02-14 22:29:56 -05:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Alan Mackenzie
016b3d5894 In comment-dwim with style `extra-line', respect indent-tabs-mode.
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-15 12:32:32 +00:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Ivan Andrus
f247147d16 ; Implement Stefan's feedback on last two commits 2015-09-23 17:49:50 -06:00
Ivan Andrus
04ef947705 Allow major-modes full control over quoting nested comments
* newcomment.el (comment-quote-nested-function): New variable.
(comment-quote-nested-default): New function.
(comment-quote-nested): Use `comment-quote-nested-function'.
2015-09-23 17:48:41 -06:00
Stefan Monnier
6c33e7ada5 * prolog.el: Fix indentation of empty line
* 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-22 11:11:50 -04:00
Zachary Kanfer
4a703c7330 * lisp/newcomment.el (comment-dwim): Use `use-region-p'
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-09-01 03:13:05 +01:00
Paul Eggert
875a5d0ead Prefer directed to neutral quotes
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-08-24 23:57:25 -07:00
Artur Malabarba
7d631aa0ff newcomment.el (comment-line): Fix missing paren. 2015-02-08 20:24:36 -02:00
Artur Malabarba
97cb255360 newcomment.el (comment-line): New command on C-x C-;. 2015-02-08 19:03:17 -02:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Stefan Monnier
0d6a1375af * lisp/newcomment.el (comment-indent-new-line): Sink code where it's used.
Reuse the previous comment's indentation unconditionally if it's on its
own line.
2014-04-10 21:05:03 -04:00
Dmitry Gutov
2b7858ecbd Further tweaks for comment-start-skip behavior
* 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-18 08:06:33 +02:00
Dmitry Gutov
218feefcc0 Restore compatibility with legacy comment-start-skip values
* lisp/newcomment.el (comment-beginning): If `comment-start-skip'
doesn't match, move back one char and try again.

Fixes: debbugs:16971
2014-03-17 08:48:09 +02:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Glenn Morris
9c61f806fb Misc small custom fixes
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-12-27 17:24:15 -08:00