]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoBump FACE_CACHE_BUCKETS_SIZE to 1009
Eli Zaretskii [Wed, 10 Feb 2021 16:10:17 +0000 (18:10 +0200)]
Bump FACE_CACHE_BUCKETS_SIZE to 1009

* src/xfaces.c (FACE_CACHE_BUCKETS_SIZE): Make it 1009, a prime
number, per the comment.  Reported by Win Treese <treese@acm.org>.

3 years agoFix local defvar scoping error (bug#46387)
Mattias Engdegård [Wed, 10 Feb 2021 13:26:49 +0000 (14:26 +0100)]
Fix local defvar scoping error (bug#46387)

This bug was introduced by the lexical variable constant propagation
mechanism.  It was discovered by Michael Heerdegen.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form)
(byte-optimize-body): Let the effects of a local defvar declaration be
scoped by let and let*, not any arbitrary Lisp expression body (such
as progn).
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--get-vars)
(bytecomp-local-defvar): New test.

3 years agoMinor cleanup in imenu.el
Stefan Kangas [Wed, 10 Feb 2021 13:10:10 +0000 (14:10 +0100)]
Minor cleanup in imenu.el

* lisp/imenu.el: Doc fix; these examples have been removed.  Remove
redundant :group args.

3 years agoUse lexical-binding in snmp-mode.el
Stefan Kangas [Wed, 10 Feb 2021 13:08:01 +0000 (14:08 +0100)]
Use lexical-binding in snmp-mode.el

* lisp/net/snmp-mode.el: Use lexical-binding.  Remove redundant :group
args.  Doc fix; remove outdated information.
(snmp-mode, snmpv2-mode): Add FIXME to use define-derived-mode.

3 years agoDeclare empty macro imenu-progress-menu obsolete
Stefan Kangas [Wed, 10 Feb 2021 12:59:09 +0000 (13:59 +0100)]
Declare empty macro imenu-progress-menu obsolete

* lisp/imenu.el: Remove commented out code.
(imenu-progress-message): Declare macro obsolete.

* lisp/erc/erc-imenu.el (erc-create-imenu-index):
* lisp/net/snmp-mode.el (snmp-mode-imenu-create-index):
* lisp/progmodes/antlr-mode.el (antlr-imenu-create-index-function):
Don't use or mention above obsolete macro.

3 years agoUpdate NEWS entry for vc-dir faces
Protesilaos Stavrou [Wed, 10 Feb 2021 04:03:33 +0000 (06:03 +0200)]
Update NEWS entry for vc-dir faces

* NEWS: Remove reference to specific backend, as it now applies to all
of them.  Update name of 'vc-dir-status-ignored'.

This follows from the discussion in bug#46358.

3 years ago* lisp/cedet/semantic/bovine/gcc.el: Use lexical-binding.
Stefan Kangas [Wed, 10 Feb 2021 12:21:34 +0000 (13:21 +0100)]
* lisp/cedet/semantic/bovine/gcc.el: Use lexical-binding.

3 years agoMove cedet test resource files to follow our conventions
Stefan Kangas [Wed, 10 Feb 2021 11:44:07 +0000 (12:44 +0100)]
Move cedet test resource files to follow our conventions

* test/lisp/cedet/semantic-utest-ia.el (ert, ert-x): Require.
(cedet-utest-directory, semantic-utest-test-directory): Remove
variables.
(semantic-utest-ia-doublens.cpp, semantic-utest-ia-subclass.cpp)
(semantic-utest-ia-typedefs.cpp, semantic-utest-ia-struct.cpp)
(semantic-utest-ia-templates.cpp, semantic-utest-ia-using.cpp)
(semantic-utest-ia-nsp.cpp, semantic-utest-ia-localvars.cpp)
(semantic-utest-ia-namespace.cpp)
(semantic-utest-ia-sppcomplete.c, semantic-utest-ia-varnames.c)
(semantic-utest-ia-javacomp.java)
(semantic-utest-ia-varnames.java, semantic-utest-ia-wisent.wy)
(semantic-utest-ia-texi, semantic-utest-ia-make)
(semantic-utest-ia-srecoder): Use 'ert-resource-file'.  Don't
check if file exists; we can assume that it does.

* test/manual/cedet/tests/testjavacomp.java:
* test/manual/cedet/tests/testlocalvars.cpp:
* test/manual/cedet/tests/testnsp.cpp:
* test/manual/cedet/tests/testsppcomplete.c:
* test/manual/cedet/tests/teststruct.cpp:
* test/manual/cedet/tests/testsubclass.cpp:
* test/manual/cedet/tests/testsubclass.hh:
* test/manual/cedet/tests/testtemplates.cpp:
* test/manual/cedet/tests/testtypedefs.cpp:
* test/manual/cedet/tests/testusing.cpp:
* test/manual/cedet/tests/testusing.hh:
* test/manual/cedet/tests/testvarnames.c:
* test/manual/cedet/tests/testvarnames.java:
* test/manual/cedet/tests/testwisent.wy: Move from here...
* test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java:
* test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp:
* test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp:
* test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c:
* test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp:
* test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp:
* test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh:
* test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp:
* test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp:
* test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp:
* test/lisp/cedet/semantic-utest-ia-resources/testusing.hh:
* test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c:
* test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java:
* test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy:
...to here.

3 years agoConvert tests for srecode/fields.el to ert
Stefan Kangas [Wed, 10 Feb 2021 11:20:32 +0000 (12:20 +0100)]
Convert tests for srecode/fields.el to ert

* test/manual/cedet/srecode-tests.el: Move from here...
* test/lisp/cedet/srecode/fields-tests.el: ...to here.
(srecode-field-utest-impl): Convert test to ert.  Silence
byte-compiler.

* test/manual/cedet/cedet-utests.el (cedet-utest-libs): Don't
list the above moved file.

3 years ago; * test/lisp/cedet/semantic/format-tests.el: Minor cleanup.
Stefan Kangas [Wed, 10 Feb 2021 05:40:13 +0000 (06:40 +0100)]
; * test/lisp/cedet/semantic/format-tests.el: Minor cleanup.

3 years agoMake texinfmt-version variable obsolete
Stefan Kangas [Wed, 10 Feb 2021 03:48:43 +0000 (04:48 +0100)]
Make texinfmt-version variable obsolete

* lisp/textmodes/texinfmt.el (texinfmt-version): Make variable and
command obsolete in favour of 'emacs-version'.
(texinfo-format-region, texinfo-format-buffer-1): Use
'emacs-version' instead of above obsolete variable.

3 years agoUse lexical-binding in bib-mode.el
Stefan Kangas [Wed, 10 Feb 2021 03:42:37 +0000 (04:42 +0100)]
Use lexical-binding in bib-mode.el

* lisp/textmodes/bib-mode.el: Use lexical-binding.  Remove
redundant :group args.

3 years agoMove semantic/format.el tests to follow our conventions
Stefan Kangas [Wed, 10 Feb 2021 03:14:48 +0000 (04:14 +0100)]
Move semantic/format.el tests to follow our conventions

* test/lisp/cedet/semantic-utest-fmt.el: Move from here...
* test/lisp/cedet/semantic/format-tests.el: ...to here.
(ert, ert-x): Require.
(semantic-fmt-utest-file-list): Use ert-resource-file.
* test/manual/cedet/tests/test-fmt.cpp:
* test/manual/cedet/tests/test-fmt.el: Move from here...
* test/lisp/cedet/semantic/format-resources/test-fmt.cpp:
* test/lisp/cedet/semantic/format-resources/test-fmt.el: ...to here.

3 years agoUse lexical-binding in some test files
Stefan Kangas [Wed, 10 Feb 2021 02:06:27 +0000 (03:06 +0100)]
Use lexical-binding in some test files

* test/manual/cedet/ede-tests.el:
* test/manual/cedet/srecode-tests.el:
* test/manual/cedet/tests/test.el: Use lexical-binding.

* test/manual/etags/el-src/TAGTEST.EL: Add lexical-binding cookie.
* test/manual/etags/ETAGS.good_1: Update expected result for the
above change.

3 years agoChange default semantic-lex-analyzer to semantic-lex
Stefan Kangas [Wed, 10 Feb 2021 02:02:03 +0000 (03:02 +0100)]
Change default semantic-lex-analyzer to semantic-lex

* lisp/cedet/semantic/lex.el (semantic-lex-analyzer): Change default
to semantic-lex, since semantic-flex was obsolete and has been
removed.

3 years agoConvert many manual cedet tests to ert
Stefan Kangas [Wed, 10 Feb 2021 01:07:55 +0000 (02:07 +0100)]
Convert many manual cedet tests to ert

* test/manual/cedet/cedet-utests.el
(cedet-files-utest): Move test from here...
* test/lisp/cedet/cedet-files-tests.el: ...to this new file.

* test/manual/cedet/srecode-tests.el
(srecode-document-function-comment-extract-test): Move test from
here...
* test/lisp/cedet/srecode/document-tests.el: ...to this new file.

* test/manual/cedet/cedet-utests.el
(inversion-unit-test): Move test from here...
* test/lisp/cedet/inversion-tests.el: ...to this new file.

* test/manual/cedet/semantic-tests.el
(semantic-gcc-test-output-parser): Move test from here...
* test/lisp/cedet/semantic/bovine/gcc-tests.el: ...to this new file.

* test/manual/cedet/semantic-tests.el
(semantic-test-data-cache): Move test from here...
* test/lisp/cedet/semantic/fw-tests.el: ...to this new file.

3 years agoUse lexical-binding in almost all of play/*.el
Stefan Kangas [Wed, 10 Feb 2021 00:23:41 +0000 (01:23 +0100)]
Use lexical-binding in almost all of play/*.el

* lisp/play/5x5.el: Use lexical-binding.
(5x5-draw-grid-end, 5x5-draw-grid, 5x5-solver)
(5x5-solve-suggest): Silence byte-compiler.

* lisp/play/cookie1.el: Use lexical-binding.
(cookie-shuffle-vector, cookie-apropos): Silence byte-compiler.

* lisp/play/zone.el: Use lexical-binding.
(zone): Convert lambda to proper lexical closure.
(zone-replace-char, zone-fill-out-screen): Silence byte-compiler.

* lisp/play/blackbox.el:
* lisp/play/doctor.el:
* lisp/play/gametree.el:
* lisp/play/hanoi.el: Use lexical-binding.

* test/lisp/play/cookie1-resources/cookies:
* test/lisp/play/cookie1-tests.el: New files.

3 years agoRefine use of vc-dir faces; apply to all backends
Protesilaos Stavrou [Tue, 9 Feb 2021 04:49:05 +0000 (06:49 +0200)]
Refine use of vc-dir faces; apply to all backends

* lisp/vc/vc-dir.el (vc-default-dir-printer): Add check for the
"ignored" status and make 'vc-dir-status-edited' the default face.
Also extend condition for more states that qualify as "warnings".

(vc-dir-ignored, vc-dir-status-ignored): Rename face for consistency.

* lisp/vc/vc-git.el (vc-git-dir-printer): Use the
'vc-dir-status-edited' as the default for the Git backend.  And
reference the renamed face.  Also stop treating the empty stash
differently from other header values.

* lisp/vc/vc-bzr.el (vc-bzr-dir-extra-headers): Implement new faces.
* lisp/vc/vc-cvs.el (vc-cvs-dir-extra-headers): Same.
* lisp/vc/vc-hg.el (vc-hg-dir-extra-headers): Same.
* lisp/vc/vc-svn.el (vc-svn-dir-extra-headers): Same.

This follows from the discussion in bug#46358.

3 years ago; Fix warning in last change to semantic/idle.el.
Basil L. Contovounesios [Tue, 9 Feb 2021 19:04:58 +0000 (19:04 +0000)]
; Fix warning in last change to semantic/idle.el.

3 years agoTiny simplification to read-char-by-name
Basil L. Contovounesios [Tue, 9 Feb 2021 18:59:24 +0000 (18:59 +0000)]
Tiny simplification to read-char-by-name

* lisp/international/mule-cmds.el (mule--ucs-names-sort-by-code):
Sort with car-less-than-car instead of slower lambda.
(mule--ucs-names-affixation): Just stick character into a list to
avoid trip through format and char-to-string.
(read-char-by-name): Quote function symbols as such.

3 years agoFix syntax category of some characters
Eli Zaretskii [Tue, 9 Feb 2021 18:57:29 +0000 (20:57 +0200)]
Fix syntax category of some characters

* lisp/international/characters.el (modify-syntax-entry): Fix
syntax of numerical subscripts and superscripts.  (Bug#46240)

3 years ago* lisp/net/dictionary.el: Dictionary improvements (bug#45262)
Juri Linkov [Tue, 9 Feb 2021 18:29:54 +0000 (20:29 +0200)]
* lisp/net/dictionary.el: Dictionary improvements (bug#45262)

* lisp/net/dictionary.el (dictionary-link-dictionary): New defcustom.
(dictionary-mark-reference): Use dictionary-link-dictionary.
(dictionary-post-buffer-hook): New defcustom.
(dictionary-post-buffer): Run dictionary-post-buffer-hook.
(dictionary-mode-map): Bind 'S-SPC' to scroll-down-command.
(dictionary-search-default): Use possibly multi-word data at point.

3 years agoUse lexical-binding in a few more scattered files
Stefan Monnier [Tue, 9 Feb 2021 18:27:08 +0000 (13:27 -0500)]
Use lexical-binding in a few more scattered files

* lisp/registry.el: Use lexical-binding.
(registry-reindex): Remove unused var `values`.

* lisp/cedet/pulse.el: Use lexical-binding.

* lisp/cedet/semantic/idle.el: Use lexical-binding.
(semantic-idle-core-handler): Remove unused var `safe`.
(ede-auto-add-method): Declare var.
(define-semantic-idle-service): Use `declare`.  Remove unused var `setup`.
(pulse-flag): Declare var.

* lisp/net/ldap.el: Use lexical-binding.
(ldap-search-internal): Remove unused var `proc`.

* lisp/net/mairix.el: Use lexical-binding.
Remove redundant `:group` args.
(mairix-widget-create-query): Remove unnused var `allwidgets`.

3 years agoNew options read-char-by-name-sort and read-char-by-name-group (bug#46240)
Juri Linkov [Tue, 9 Feb 2021 18:12:36 +0000 (20:12 +0200)]
New options read-char-by-name-sort and read-char-by-name-group (bug#46240)

* lisp/international/mule-cmds.el (mule--ucs-names-sort-by-code)
(mule--ucs-names-group): New functions.
(read-char-by-name-sort, read-char-by-name-group): New defcustoms.
(read-char-by-name): Use them.

3 years ago* lisp/cedet/{semantic/scope.el,ede/project-am.el}: Use lexical-scoping
Stefan Monnier [Tue, 9 Feb 2021 17:52:04 +0000 (12:52 -0500)]
* lisp/cedet/{semantic/scope.el,ede/project-am.el}: Use lexical-scoping

* lisp/cedet/ede/project-am.el: Remove redundant `:group` args.
(recentf-exclude): Declare variable.
(project-am--with-makefile-current): New function extracted from
`project-am-with-makefile-current`.  Use `with-current-buffer` and
`unwind-protect`.
(project-am-with-makefile-current): Use `declare` and
`project-am--with-makefile-current`.
(project-am-with-config-current): Use `declare` and `with-temp-buffer`.
(project-am-extract-shell-variable): Turn it into a `defun`; the use of
`defmacro` appears to have been a plain mistake.

3 years ago* lisp/emacs-lisp/byte-opt.el (byte-optimize--pcase): New macro
Stefan Monnier [Tue, 9 Feb 2021 17:10:07 +0000 (12:10 -0500)]
* lisp/emacs-lisp/byte-opt.el (byte-optimize--pcase): New macro

(byte-optimize-form-code-walker): Use it.

3 years ago* lisp/emacs-lisp/macroexp.el: Break cycle with bytecomp/byte-opt
Stefan Monnier [Tue, 9 Feb 2021 17:02:25 +0000 (12:02 -0500)]
* lisp/emacs-lisp/macroexp.el: Break cycle with bytecomp/byte-opt

The recent change in macroexp triggered a cyclic dependency error
during eager macroexpansion when neither `bytecomp` nor `byte-opt` had
been byte-compiled yet.  This fixes it by moving the offending
function to macroexp.el.

* lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda): Move from
byte-opt.el and rename.
(macroexp--expand-all): Use it.

* lisp/emacs-lisp/byte-opt.el (byte-compile-unfold-lambda): Move to
macroexp.el.
(byte-compile-inline-expand, byte-optimize-form-code-walker):
* lisp/emacs-lisp/bytecomp.el (byte-compile-form):
Use `macroexp--unfold-lambda` instead.

3 years agoRemove some dead, commented out code from lisp-mode.el
Stefan Kangas [Tue, 9 Feb 2021 15:57:27 +0000 (16:57 +0100)]
Remove some dead, commented out code from lisp-mode.el

* lisp/emacs-lisp/lisp-mode.el (lisp-data-mode-syntax-table):
Remove code commented out since 2005.

3 years agoLoad all generic-x.el modes unconditionally
Stefan Kangas [Tue, 9 Feb 2021 14:58:37 +0000 (15:58 +0100)]
Load all generic-x.el modes unconditionally

* lisp/generic-x.el: Load all modes unconditionally.
(generic-default-modes, generic-mswindows-modes)
(generic-unix-modes, generic-other-modes)
(generic-extras-enable-list): Make obsolete.
Ref: https://lists.gnu.org/r/emacs-devel/2021-01/msg01403.html

3 years agoNote that the `values' variable is now obsolete
Lars Ingebrigtsen [Tue, 9 Feb 2021 15:28:30 +0000 (16:28 +0100)]
Note that the `values' variable is now obsolete

* src/lread.c (syms_of_lread): Note that it's obsolete in the doc
string (because we can't mark it as obsolete "properly" yet,
because that leads to compilation warnings when somebody
(let (values) ... values).

3 years ago; Fix recent change in eval-last-sexp
Basil L. Contovounesios [Tue, 9 Feb 2021 13:00:56 +0000 (13:00 +0000)]
; Fix recent change in eval-last-sexp

3 years ago; Finish customize-changed-options obsoletion
Basil L. Contovounesios [Tue, 9 Feb 2021 12:50:36 +0000 (12:50 +0000)]
; Finish customize-changed-options obsoletion

3 years agoAllow exit-minibuffer to be called from Lisp code. Fixes bug #46373
Alan Mackenzie [Tue, 9 Feb 2021 09:41:13 +0000 (09:41 +0000)]
Allow exit-minibuffer to be called from Lisp code.  Fixes bug #46373

* lisp/minibuffer.el (exit-minibuffer): Throw the error "Not in most nested
minibuffer" only when the current buffer is a minibuffer (thus the command
came directly from a key binding).

* doc/lispref/minibuf.texi (Minibuffer Commands): Change the documentation
accordingly.

3 years agoMake pcomplete-ignore-case obsolete
Lars Ingebrigtsen [Tue, 9 Feb 2021 08:20:11 +0000 (09:20 +0100)]
Make pcomplete-ignore-case obsolete

* lisp/pcomplete.el (pcomplete-completions-at-point)
(pcomplete-stub, pcomplete--entries, pcomplete-insert-entry):
* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize):
* lisp/eshell/em-cmpl.el (eshell-cmpl-ignore-case):
* lisp/erc/erc-pcomplete.el (pcomplete-erc-setup): Use
`completion-ignore-case' instead (bug#23117).

* lisp/pcomplete.el (pcomplete-ignore-case): Make obsolete.

3 years agoPreserve leading whitespace in `lm-commentary'.
Matt Armstrong [Tue, 9 Feb 2021 08:10:45 +0000 (09:10 +0100)]
Preserve leading whitespace in `lm-commentary'.

* lisp/emacs-lisp/lisp-mnt.el (lm-commentary): Preserve leading
whitespace (bug#46364).

3 years agoMove all usages of `values' to `values--store-value'
Lars Ingebrigtsen [Tue, 9 Feb 2021 08:04:47 +0000 (09:04 +0100)]
Move all usages of `values' to `values--store-value'

* lisp/simple.el (eval-expression):
* lisp/progmodes/elisp-mode.el (eval-last-sexp):
* lisp/emacs-lisp/pp.el (pp-eval-expression):
* lisp/emacs-lisp/edebug.el (edebug-eval-expression):
* lisp/emacs-lisp/pp.el (pp-eval-expression):
* lisp/emacs-lisp/edebug.el (edebug-eval-expression):
* lisp/cedet/data-debug.el (data-debug-eval-expression): Use it
instead of pushing to `values' directly (bug#22066).

* lisp/subr.el (values--store-value): New function.

3 years agoDon't use `values' in elisp--eval-defun
Lars Ingebrigtsen [Tue, 9 Feb 2021 07:32:40 +0000 (08:32 +0100)]
Don't use `values' in elisp--eval-defun

* lisp/progmodes/elisp-mode.el (elisp--eval-defun): Don't use
`values', since it's being deprecated (bug#22066).

3 years agoFinish customize-changed-options/customize-changed fix up
Lars Ingebrigtsen [Tue, 9 Feb 2021 07:20:08 +0000 (08:20 +0100)]
Finish customize-changed-options/customize-changed fix up

* doc/emacs/custom.texi (Specific Customization): Fix
customize-changed/customize-changed-options documentation.
* lisp/cus-dep.el (custom-make-dependencies): Adjust doc string
(bug#23085).

* lisp/menu-bar.el (menu-bar-custom-menu): Adjust menu options.

3 years agoFix count-lines problem in non-ASCII buffers
Lars Ingebrigtsen [Tue, 9 Feb 2021 07:12:10 +0000 (08:12 +0100)]
Fix count-lines problem in non-ASCII buffers

* src/fns.c (Fline_number_at_pos): Get the correct start position
in non-ASCII buffers (bug#22763).

3 years ago* lisp/gnus/gnus-topic.el: Fix a backward incompatibility
Stefan Monnier [Tue, 9 Feb 2021 00:08:14 +0000 (19:08 -0500)]
* lisp/gnus/gnus-topic.el: Fix a backward incompatibility

(gnus-topic-insert-topic-line): Make the vars used in
`gnus-topic-line-format-spec` dynamically scoped since it seems
that they're sometimes accessed from functions called by
`gnus-topic-line-format-spec` :-(

* lisp/gnus/gnus-util.el (gnus--\,@): Move macro to here...
* lisp/gnus/gnus-art.el (gnus--\,@): .. from here.

* lisp/gnus/gnus.el (gnus-method-to-server): Apply DeMorgan.

3 years agoRun Gnus group names through regexp-quote when matching results
Eric Abrahamsen [Mon, 8 Feb 2021 20:27:04 +0000 (12:27 -0800)]
Run Gnus group names through regexp-quote when matching results

* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Be more
careful about making sure group names will match search results
correctly.

3 years ago; * etc/NEWS: Call out a recent change in Enriched mode.
Eli Zaretskii [Mon, 8 Feb 2021 16:19:31 +0000 (18:19 +0200)]
; * etc/NEWS: Call out a recent change in Enriched mode.

3 years agoFix scrolling past tall images
Eli Zaretskii [Mon, 8 Feb 2021 16:04:00 +0000 (18:04 +0200)]
Fix scrolling past tall images

* src/xdisp.c (try_window): Don't try checking the margins if the
window is vscrolled, as that could cause unnecessary recentering
when tall images are displayed.  (Bug#46320)

3 years ago* lisp/indent.el (beginning-of-line-text): Mark it as a movement command
Stefan Monnier [Mon, 8 Feb 2021 14:18:41 +0000 (09:18 -0500)]
* lisp/indent.el (beginning-of-line-text): Mark it as a movement command

So that combining it with `shift` selects the text, as usual, in case
you have it bound for example to `C-a` in a mode like `enriched-mode`.

3 years ago; Minor license statement fixes
Stefan Kangas [Mon, 8 Feb 2021 08:03:27 +0000 (09:03 +0100)]
; Minor license statement fixes

3 years ago* lisp/avoid.el: Doc fixes.
Stefan Kangas [Mon, 8 Feb 2021 07:23:19 +0000 (08:23 +0100)]
* lisp/avoid.el: Doc fixes.

3 years agoRecord the value of `C-x C-e' in `values'
Lars Ingebrigtsen [Mon, 8 Feb 2021 07:15:45 +0000 (08:15 +0100)]
Record the value of `C-x C-e' in `values'

* lisp/progmodes/elisp-mode.el (eval-last-sexp): Record the value
in `values' (bug#22066) since we're messaging it.

3 years agoAdd vc-dir faces; also apply them to vc-git
Protesilaos Stavrou [Mon, 8 Feb 2021 06:54:54 +0000 (07:54 +0100)]
Add vc-dir faces; also apply them to vc-git

* etc/NEWS: Document the new faces.

* lisp/vc/vc-dir.el (vc-dir-header, vc-dir-header-value)
(vc-dir-directory, vc-dir-file, vc-dir-mark-indicator)
(vc-dir-status-warning, vc-dir-status-edited, vc-dir-status-up-to-date)
(vc-dir-ignored): Add new faces.

* lisp/vc/vc-git.el (vc-git-permissions-as-string, vc-git-dir-printer)
(vc-git-dir-extra-headers): Apply new faces (bug#46358).

3 years agoBind clone-buffer to C-x x n
Sean Whitton [Mon, 8 Feb 2021 06:52:16 +0000 (07:52 +0100)]
Bind clone-buffer to C-x x n

* lisp/bindings.el (ctl-x-x-map): Bind clone-buffer.
* etc/NEWS: Document the change (bug#46369).

3 years agoFix tcl-mode indentation of namespaced code
Anticrisis [Mon, 8 Feb 2021 06:33:49 +0000 (07:33 +0100)]
Fix tcl-mode indentation of namespaced code

* lisp/progmodes/tcl.el (tcl-calculate-indent): Fix indentation
when using namespaces (bug#44834).
(tcl-beginning-of-defun-function): Remove.  This partially reverts
cd5bb4bf3dbad8941d25823f398b595b8f0edbb9.

Copyright-paperwork-exempt: yes

3 years agoClarify "changes" in CONTRIBUTE
Lars Ingebrigtsen [Mon, 8 Feb 2021 06:30:18 +0000 (07:30 +0100)]
Clarify "changes" in CONTRIBUTE

* CONTRIBUTE: Clarify that "changes" doesn't include removing code
(bug#44834).

3 years agoMake `C-a' in enriched-mode behave more line in other modes
Lars Ingebrigtsen [Mon, 8 Feb 2021 06:22:02 +0000 (07:22 +0100)]
Make `C-a' in enriched-mode behave more line in other modes

* lisp/textmodes/enriched.el (enriched-mode-map): Don't rebind
beginning-or-line, because it makes `C-S-a' not mark the region,
and it doesn't allow actually moving to the beginning of the line
if the line starts with characters in `adaptive-fill-regexp'
(bug#22554).

3 years agoFix noninteractive gnus-article-press-button
Lars Ingebrigtsen [Mon, 8 Feb 2021 06:11:52 +0000 (07:11 +0100)]
Fix noninteractive gnus-article-press-button

* lisp/gnus/gnus-art.el (gnus-article-press-button): Make the `b'
summary mode command work again.

3 years agoPrefer setq-local in a few more places
Stefan Kangas [Sun, 7 Feb 2021 23:25:16 +0000 (00:25 +0100)]
Prefer setq-local in a few more places

* lisp/calc/calc-embed.el (calc-embedded-make-info):
* lisp/calc/calcalg2.el (calcFunc-integ):
* lisp/comint.el (comint-mode):
* lisp/epa.el (epa--list-keys, epa--show-key):
* lisp/epg.el (epg--start):
* lisp/vc/ediff-util.el (ediff-activate-mark): Prefer setq-local.

3 years agoAdd tests for count-lines
Stefan Kangas [Sun, 7 Feb 2021 23:24:11 +0000 (00:24 +0100)]
Add tests for count-lines

* test/lisp/simple-tests.el (simple-test-count-lines)
(simple-test-count-lines/ignore-invisible-lines): Add tests.

3 years agoFix namazu search result parsing in gnus-search
Eric Abrahamsen [Sun, 7 Feb 2021 21:46:50 +0000 (13:46 -0800)]
Fix namazu search result parsing in gnus-search

* lisp/gnus/gnus-search.el (gnus-search-indexed-extract): This method
is documented to leave point at the end of the extracted search
result. The namazu implementation wasn't doing that.

3 years ago; Rearrange changed entry in etc/NEWS
Michael Albinus [Sun, 7 Feb 2021 18:38:49 +0000 (19:38 +0100)]
; Rearrange changed entry in etc/NEWS

3 years agoUse `line-number-at-pos' in `count-lines'
Lars Ingebrigtsen [Sun, 7 Feb 2021 16:29:57 +0000 (17:29 +0100)]
Use `line-number-at-pos' in `count-lines'

* lisp/simple.el (count-lines): Use `line-number-at-pos', which
should be faster.

3 years agoAdd command to recenter errors from Occur/Grep buffers
Tino Calancha [Sun, 7 Feb 2021 15:51:07 +0000 (16:51 +0100)]
Add command to recenter errors from Occur/Grep buffers

To scroll up/down the current displayed occurrence/error
without abandon the Occur/Grep buffer.

Add also a command 'recenter-other-window' to recenter
the other window from any kind of buffer.

* lisp/window.el (recenter-other-window): New command.
Bind recenter-other-window to S-M-C-l (Bug#46119).

* lisp/simple.el (recenter-current-error): New command.
* lisp/progmodes/grep.el (grep-mode-map):
Delete bidings for n and p.

* lisp/progmodes/compile.el (compilation-minor-mode-map):
Move here the n and p bindings.
Bind `recenter-current-error' to l.
* lisp/replace.el (occur-mode-map):
Same.

* doc/emacs/windows.texi (Other Window):
* doc/emacs/display.texi (Recentering):
Document recenter-other-window.

* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1):
Announce the changes.

3 years agoAllow Fline_number_at_pos being called with a marker
Lars Ingebrigtsen [Sun, 7 Feb 2021 15:42:25 +0000 (16:42 +0100)]
Allow Fline_number_at_pos being called with a marker

* src/fns.c (Fline_number_at_pos): Also allow being called with a
marker (since the Lisp function allowed that).

3 years agoMove line-number-at-pos to C
Lars Ingebrigtsen [Sun, 7 Feb 2021 15:28:30 +0000 (16:28 +0100)]
Move line-number-at-pos to C

* doc/lispref/positions.texi (Text Lines): Revert previous change.

* lisp/simple.el (line-number-at-pos): Remove definition.

* lisp/simple.el (count-lines): Revert back to using
`forward-line', because there seems to be a disagreement on how
lines should be counted in a region...

* src/fns.c (Fline_number_at_pos): Rename from
Fline_number_at_position and adjust parameter list.

3 years agoMinor doc fixes in dictionary-connection.el
Stefan Kangas [Sun, 7 Feb 2021 15:06:06 +0000 (16:06 +0100)]
Minor doc fixes in dictionary-connection.el

* lisp/net/dictionary-connection.el:
(dictionary-connection-p, dictionary-connection-read-to-point):
Minor doc fixes to adhere to our conventions.

3 years agoFix copyright and license statement in dictionary*.el
Stefan Kangas [Sun, 7 Feb 2021 15:02:30 +0000 (16:02 +0100)]
Fix copyright and license statement in dictionary*.el

* lisp/net/dictionary-connection.el:
* lisp/net/dictionary.el: Add copyright statement and fix license
statement.

3 years agoAdd a new function 'line-number-at-position'
Lars Ingebrigtsen [Sun, 7 Feb 2021 15:02:56 +0000 (16:02 +0100)]
Add a new function 'line-number-at-position'

* doc/lispref/positions.texi (Text Lines): Document it.

* lisp/simple.el (count-lines): Use it.
(line-number-at-pos): Ditto.

* src/fns.c (Fline_number_at_position): New function (bug#22763).

3 years agoVarious doc fixes in dictionary.el
Stefan Kangas [Sun, 7 Feb 2021 14:53:46 +0000 (15:53 +0100)]
Various doc fixes in dictionary.el

* lisp/net/dictionary.el (dictionary-set-server-var)
(dictionary-server, dictionary-port)
(dictionary-default-dictionary)
(dictionary-default-popup-strategy, dictionary-proxy-server)
(dictionary-proxy-port, dictionary-description-open-delimiter)
(dictionary-description-close-delimiter)
(dictionary-window-configuration, dictionary-selected-window)
(dictionary-position-stack, dictionary-data-stack)
(dictionary-positions, dictionary-current-data)
(dictionary-connection, dictionary-instances)
(dictionary-color-support, dictionary-word-history)
(dictionary-mode, dictionary, dictionary-check-connection)
(dictionary-mode-p, dictionary-send-command)
(dictionary-read-reply-and-split, dictionary-check-reply)
(dictionary-check-initial-reply, dictionary-store-state)
(dictionary-store-positions, dictionary-new-search)
(dictionary-new-search-internal, dictionary-do-search)
(dictionary-display-search-result)
(dictionary-display-word-definition)
(dictionary-special-dictionary, dictionary-set-strategy)
(dictionary-tooltip-dictionary, dictionary-switch-tooltip-mode)
(dictionary-tooltip-mode, global-dictionary-tooltip-mode): Doc fixes
to adhere to our conventions.

3 years agoRevert "Fix inferior octave single-quote font lock"
Lars Ingebrigtsen [Sun, 7 Feb 2021 14:12:15 +0000 (15:12 +0100)]
Revert "Fix inferior octave single-quote font lock"

This reverts commit 9e68413c7f0a7f71e1cee923ace7282d14c2e686.

This patch led to bug#46327:

x = [2 2]'
disp(x)

Which meant that the transpose operator was interpreted
as the start of a string.

3 years agoReverse customize-changed and customize-changed-options aliasing
Lars Ingebrigtsen [Sun, 7 Feb 2021 14:07:21 +0000 (15:07 +0100)]
Reverse customize-changed and customize-changed-options aliasing

* lisp/cus-edit.el (customize-changed): Rename from
customize-changed-options (bug#23085), since the old name doesn't
reflect what it does: It's not just about user options, but also
faces and the like.
(customize-changed-options): Make into an obsolete alias.

3 years agoClarify that #s(hash-table ...) doesn't always create a new hash table
Lars Ingebrigtsen [Sun, 7 Feb 2021 13:47:09 +0000 (14:47 +0100)]
Clarify that #s(hash-table ...) doesn't always create a new hash table

* doc/lispref/hash.texi (Creating Hash): Note that the printed
representation doesn't necessarily create a new table (bug#23417).

* doc/lispref/lists.texi (Rearrangement): Link to Self-Evaluating
Forms to further expand upon immutability.

3 years agoAdd more commands to the new `C-x x' keymap
Lars Ingebrigtsen [Sun, 7 Feb 2021 12:53:44 +0000 (13:53 +0100)]
Add more commands to the new `C-x x' keymap

* doc/emacs/killing.texi (Accumulating Text):
* doc/emacs/display.texi (Line Truncation):
* doc/emacs/buffers.texi (Misc Buffer): Document it.

* lisp/bindings.el (ctl-x-x-map): Add new bindings for
rename-buffer, rename-uniquely, insert-buffer and
toggle-truncate-lines.

3 years agoMove 'revert-buffer' global binding to 'C-x g g'
Sean Whitton [Sun, 7 Feb 2021 12:30:33 +0000 (13:30 +0100)]
Move 'revert-buffer' global binding to 'C-x g g'

* lisp/bindings.el: Define ctl-x-g-map and bind 'revert-buffer' to
'C-x x g' globally.
* doc/emacs/files.texi: Replace 'C-x g' with 'C-x x g'.
* etc/NEWS: Document the change (bug#46300).

3 years ago; * lisp/emacs-lisp/byte-opt.el: improved comment
Mattias Engdegård [Sun, 7 Feb 2021 11:24:40 +0000 (12:24 +0100)]
; * lisp/emacs-lisp/byte-opt.el: improved comment

3 years ago; Improved commentary in the variable constprop mechanism
Mattias Engdegård [Sun, 7 Feb 2021 09:35:36 +0000 (10:35 +0100)]
; Improved commentary in the variable constprop mechanism

* lisp/emacs-lisp/byte-opt.el (byte-optimize--lexvars)
(byte-optimize--vars-outside-condition)
(byte-optimize-form-code-walker, byte-optimize-let-form):
Clarify various aspects in the variable constant-propagation code,
as kindly pointed out by Stefan Monnier.

3 years agoRevert "Fix the previous change"
Dmitry Gutov [Sat, 6 Feb 2021 20:59:00 +0000 (22:59 +0200)]
Revert "Fix the previous change"

This reverts commit fc37dc298f27025823fad2d944e11cc7ee6a058d.

That change was only needed in the release branch.

3 years agoFix spurious warnings from unwise condition order in inlined code
Mattias Engdegård [Thu, 4 Feb 2021 13:32:21 +0000 (14:32 +0100)]
Fix spurious warnings from unwise condition order in inlined code

These are both conditions having the form (and A B) where A is
side-effect-free and B may be known to be nil at compile time.
The compiler will then warn about A being useless and thrown away.
The fix is to test B first.

* lisp/gnus/gnus.el (gnus-method-to-server):
Test `(not no-enter-cache)` first.
(gnus-server-get-method): Test `group` first.

3 years agoConstprop of lexical variables
Mattias Engdegård [Sat, 6 Feb 2021 17:34:45 +0000 (18:34 +0100)]
Constprop of lexical variables

Lexical variables bound to a constant value (symbol, number or string)
are substituted at their point of use and the variable then eliminated
if possible.  Example:

  (let ((x (+ 2 3))) (f x))  =>  (f 5)

This reduces code size, eliminates stack operations, and enables
further optimisations.  The implementation is conservative, and is
strongly curtailed by the presence of variable mutation, conditions
and loops.

* lisp/emacs-lisp/byte-opt.el
(byte-optimize-enable-variable-constprop)
(byte-optimize-warn-eliminated-variable): New constants.
(byte-optimize--lexvars, byte-optimize--vars-outside-condition)
(byte-optimize--vars-outside-loop, byte-optimize--dynamic-vars):
New dynamic variables.
(byte-optimize--substitutable-p, byte-optimize-let-form):
New functions.
(byte-optimize-form-code-walker): Adapt clauses for variable
constprop, and add clauses for 'setq' and 'defvar'.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-var)
(bytecomp-test-get-var, bytecomp-test-identity)
(byte-opt-testsuite-arith-data): Add test cases.

3 years ago; Fix byte-compilation warning
Eli Zaretskii [Sat, 6 Feb 2021 18:50:57 +0000 (20:50 +0200)]
; Fix byte-compilation warning

* test/src/process-tests.el (process-sentinel-interrupt-event): Fix
byte compilation warning.

3 years ago; Fix last change
Eli Zaretskii [Sat, 6 Feb 2021 18:20:31 +0000 (20:20 +0200)]
; Fix last change

3 years agoNew test for src/process.c on MS-Windows
Ioannis Kappas [Wed, 3 Feb 2021 22:50:54 +0000 (22:50 +0000)]
New test for src/process.c on MS-Windows

* test/src/process-tests.el (process-sentinel-interrupt-event):
New test.  (Bug#46284)

Copyright-paperwork-exempt: yes

3 years agoFix TEXT check in gnus-search IMAP search
Eric Abrahamsen [Sat, 6 Feb 2021 17:29:53 +0000 (09:29 -0800)]
Fix TEXT check in gnus-search IMAP search

* lisp/gnus/gnus-search.el (gnus-search-run-search): It's a string,
not a buffer!

3 years agoPermit zero value for 'child-frame-border-width' parameter (Bug#46184)
Martin Rudalics [Sat, 6 Feb 2021 17:22:29 +0000 (18:22 +0100)]
Permit zero value for 'child-frame-border-width' parameter (Bug#46184)

* doc/lispref/frames.texi (Layout Parameters): Update entry on
'child-frame-border-width' parameter.
* src/frame.c (make_frame): Init child_frame_border_width to -1.
(Fframe_child_frame_border_width): Return internal border width if
child frame border width parameter is nil.
(gui_report_frame_params): Report nil as child frame border
width parameter if the frame value is negative.
* src/frame.h (FRAME_INTERNAL_BORDER_WIDTH): Return value of
child frame border width only if it is not negative.
* src/xfns.c (Fx_create_frame): Default child frame border to -1
when recording it in its frame slot via gui_default_parameter.
* src/nsfns.m (ns_set_child_frame_border_width): Handle nil ARG.
(Fx_create_frame): Default child frame border width parameter to
nil.
* src/w32fns.c (w32_set_child_frame_border_width): Handle nil ARG.
(Fx_create_frame): Default child frame border width parameter to
nil.
* src/xfns.c (x_set_child_frame_border_width): Handle nil ARG.
(Fx_create_frame): Default child frame border width parameter to
nil.

3 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:10:38 +0000 (08:10 -0800)]
Merge from origin/emacs-27

8ad48a0bdd (origin/emacs-27) Improve doc string of 'text-scale-adjust'
7a25ff767d Clarify the indent-rigidly doc string
6c5ddf0e0b Fix two small tab bar issues
c71e08eba9 Fix last change in syntax.texi

# Conflicts:
# lisp/indent.el

3 years ago; Merge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:05:30 +0000 (08:05 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

43bf7f1b06 Correct the lispref manual about flushing ppss info

3 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:05:29 +0000 (08:05 -0800)]
Merge from origin/emacs-27

8c27af3ff4 Clarify how transient indentation modes are exited in the ...
fc37dc298f Fix the previous change

3 years ago; Merge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:05:29 +0000 (08:05 -0800)]
; Merge from origin/emacs-27

The following commits were skipped:

b99848c72c Bind default-directory to the project root
19534f988c Make sure default-directory relates to the originating buffer
d1455027e0 Initialize signal descriptions after pdumping
256356a36f Clarify the "Sentinels" node in the lispref manual
89f1634afc Fix problem with non-ASCII characters in nnmaildir

3 years agoFix previous change in testcover.el
Lars Ingebrigtsen [Sat, 6 Feb 2021 14:04:52 +0000 (15:04 +0100)]
Fix previous change in testcover.el

* lisp/emacs-lisp/testcover.el
(testcover-analyze-coverage-edebug-after): The wrapper macro is
called `1value', not `testcover-1value'.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 6 Feb 2021 13:11:29 +0000 (15:11 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years agoSupport file names with whitespace in Nroff mode
Eli Zaretskii [Sat, 6 Feb 2021 13:09:32 +0000 (15:09 +0200)]
Support file names with whitespace in Nroff mode

* lisp/textmodes/nroff-mode.el (nroff-view): Quote argument of
'Man-getpage-in-background' to support file names with special
characters.  (Bug#46051)

3 years agoTweak provided-mode-derived-p doc string
Lars Ingebrigtsen [Sat, 6 Feb 2021 12:54:33 +0000 (13:54 +0100)]
Tweak provided-mode-derived-p doc string

* lisp/subr.el (provided-mode-derived-p): Remove detail about "or
their aliases", since that seems self-evident (bug#46331) (and
derived-mode-p works the same, and doesn't have the bit in
question).

3 years agoImprove doc string of 'text-scale-adjust'
Eli Zaretskii [Sat, 6 Feb 2021 12:31:51 +0000 (14:31 +0200)]
Improve doc string of 'text-scale-adjust'

* lisp/face-remap.el (text-scale-adjust): Clarify that "default
face height" refers to the 'default' face.  (Bug#25168)

3 years agoWarn in message.el when sending encryptable mail
Lars Ingebrigtsen [Sat, 6 Feb 2021 12:26:25 +0000 (13:26 +0100)]
Warn in message.el when sending encryptable mail

* lisp/gnus/message.el (message-send): Query if it looks like
encryption was intended, but is not going to happen.

* lisp/gnus/mml-sec.el (mml-secure-is-encrypted-p): Allow saying
whether there's any <#secure tags present (bug#24411).

3 years agoRename the `1value' symbol in testcover.el
Lars Ingebrigtsen [Sat, 6 Feb 2021 11:28:46 +0000 (12:28 +0100)]
Rename the `1value' symbol in testcover.el

* lisp/emacs-lisp/testcover.el: Rename the symbol `1value'
throughout the file to `testcover-1value' to allow using the
variable in code that's to be tested (bug#25471).

3 years agoAllow provided-mode-derived-p to work on aliases
Lars Ingebrigtsen [Sat, 6 Feb 2021 11:03:43 +0000 (12:03 +0100)]
Allow provided-mode-derived-p to work on aliases

* lisp/subr.el (provided-mode-derived-p): Allow this to work on
modes that are aliases of other modes (bug#46331).  For instance:
(provided-mode-derived-p 'javascript-mode 'prog-mode)

3 years agoModernize use of prompts in auth-source.el
Michael Albinus [Sat, 6 Feb 2021 10:50:55 +0000 (11:50 +0100)]
Modernize use of prompts in auth-source.el

* lisp/auth-source.el (auth-source-search): Adapt docstring
(auth-source-format-prompt): Remove trailing ": ".
(auth-source-netrc-create, auth-source-secrets-create)
(auth-source-plstore-create): Adapt prompts.  Use `format-prompt'.
Do not ask interactively if `auth-source-save-behavior' is nil.

3 years agoClarify the indent-rigidly doc string
Lars Ingebrigtsen [Sat, 6 Feb 2021 10:46:58 +0000 (11:46 +0100)]
Clarify the indent-rigidly doc string

* lisp/indent.el (indent-rigidly): Clarify exiting the transient
mode (bug#46296).

3 years agoFix problem when ~/.mailcap had several entries for a MIME type
Lars Ingebrigtsen [Sat, 6 Feb 2021 10:40:00 +0000 (11:40 +0100)]
Fix problem when ~/.mailcap had several entries for a MIME type

* lisp/net/mailcap.el (mailcap-mime-info): Use all the matching
entries from ~/.mailcap, not just the first (bug#46318).

3 years agoAvoid a compilation warning in iter-do
Lars Ingebrigtsen [Sat, 6 Feb 2021 10:31:08 +0000 (11:31 +0100)]
Avoid a compilation warning in iter-do

* lisp/emacs-lisp/generator.el (iter-do): Avoid a compilation
warning on using variables marked for not using (bug#31641).
Eg. (iter-do (_ i))

3 years agoFix copying text properties in 'format'
Eli Zaretskii [Sat, 6 Feb 2021 09:54:08 +0000 (11:54 +0200)]
Fix copying text properties in 'format'

* src/editfns.c (styled_format): Fix accounting for text
properties that come from the format string.  (Bug#46317)

* test/src/editfns-tests.el (format-properties): Add new tests for
bug#46317.

3 years agoFix two small tab bar issues
Martin Rudalics [Sat, 6 Feb 2021 08:28:40 +0000 (09:28 +0100)]
Fix two small tab bar issues

* lisp/cus-start.el (frame-inhibit-implied-resize): Update version tag.
* lisp/frame.el (frame-inner-height): Do not count in tab bar.

3 years ago* lisp/emacs-lisp/pcase.el (let): Reimplement as a pcase macro
Stefan Monnier [Fri, 5 Feb 2021 20:07:47 +0000 (15:07 -0500)]
* lisp/emacs-lisp/pcase.el (let): Reimplement as a pcase macro

(pcase--macroexpand, pcase--u1): Remove handling of `let` from
`pcase`s core.

3 years ago; * src/xdisp.c (Fwindow_text_pixel_size): Fix comment.
Eli Zaretskii [Fri, 5 Feb 2021 20:04:15 +0000 (22:04 +0200)]
; * src/xdisp.c (Fwindow_text_pixel_size): Fix comment.