Lars Ingebrigtsen
09adf92644
Fix previous replace-in-string rewrite
...
* lisp/subr.el (replace-in-string): Fix logic errors in previous
patch.
2020-09-25 02:07:05 +02:00
Lars Ingebrigtsen
7f9ad5980c
Fix replace-in-string multibyteness problems with string-search
...
* lisp/subr.el (replace-in-string): Simplify by using the new
string-search function (bug#43598).
2020-09-25 01:53:16 +02:00
Lars Ingebrigtsen
e51a98b0c2
Add a new function 'string-search'
...
* doc/lispref/strings.texi (Text Comparison): Document it.
* src/fns.c (Fstring_search): New function.
2020-09-25 01:53:16 +02:00
Stefan Monnier
e7a69c9204
* lisp/help-fns.el (help-fns--first-release): Use etc/NEWS as well
2020-09-24 18:15:39 -04:00
Glenn Morris
976b8464fb
Update a failing lisp test
...
* test/lisp/emacs-lisp/lisp-tests.el (up-list-no-cross-string):
Update for recent "Don't signal scan-error" change.
2020-09-24 12:46:19 -07:00
Juri Linkov
1e7f636576
Horizontal scrolling for mouse wheel with Shift modifier (bug#43568)
...
* lisp/mwheel.el (mouse-wheel-scroll-amount): Change 'shift' default value
from 5 to 'hscroll'. Add new option "Scroll horizontally" for 'hscroll'.
(mwheel-scroll): Handle value 'hscroll' and call mwheel-scroll-left-function
or mwheel-scroll-right-function.
* doc/emacs/frames.texi (Mouse Commands): Update for horizontal scrolling
with Shift modifier.
2020-09-24 22:25:03 +03:00
Theodor Thornhill
89dd8cd215
Set mwheel default scroll value to 1 (bug#43380)
...
* lisp/mwheel.el (mouse-wheel-scroll-amount): Change default value 5 to 1
and shift default value from 1 to 5.
Default value is changed as discussed in etc/TODO.
2020-09-24 21:59:30 +03:00
Juri Linkov
4bc4d19bd1
* lisp/simple.el (goto-line-read-args): More relevant default line number.
2020-09-24 21:52:22 +03:00
Glenn Morris
9bf9f699b1
Add skip condition for some dbus tests
...
* test/lisp/net/dbus-tests.el (dbus-test01-type-conversion)
(dbus-test01-basic-types): Add skip for hydra.nixos.org failures.
; Standardize license notice
2020-09-24 11:47:11 -07:00
Lars Ingebrigtsen
7b3e94b664
Make set-process-buffer also update the process mark
...
* src/process.c (Fset_process_buffer): Update the process mark
(bug#43573).
2020-09-24 17:14:25 +02:00
Lars Ingebrigtsen
8463687b5d
Refactor process mark setting
...
* src/process.c (update_process_mark): Make into its own function.
(Fmake_process, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket): Use it.
2020-09-24 17:08:30 +02:00
dickmao
5df652d614
Add sanity check for Gnus groups that belong to no topic
...
* lisp/gnus/gnus-topic.el (gnus-topic-change-level): Do not change
gnus-topic-alist when group is outside "topology" (bug#43582).
2020-09-24 16:49:15 +02:00
Eli Zaretskii
897ea41d39
Fix last change in resize_mini_window
...
* src/xdisp.c (resize_mini_window): Prevent recentering the
mini-window once its start position is computed. (Bug#43572)
2020-09-24 17:13:43 +03:00
Lars Ingebrigtsen
7e7a010d85
Fix recent simple.el compilation warning
...
* lisp/simple.el (goto-line-relative): Suppress byte compilation
warning about goto-line.
2020-09-24 15:50:25 +02:00
Michael Albinus
de54cd6f0e
Minor Tramp cleanup
...
* doc/misc/tramp.texi: Some stylistic changes.
(Frequently Asked Questions): Mention ProxyCommand and ProxyJump.
* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Fix docstring.
2020-09-24 10:17:03 +02:00
Eric Abrahamsen
e542b4b785
Write Gnus active files with quotes around group names
...
* lisp/gnus/gnus-util.el (gnus-write-active-file): In case of group
names with spaces in them (see Bug#42823). Names are later read with
`read', so this should be quite robust.
2020-09-23 16:01:38 -07:00
Juri Linkov
dc86c4cc0b
New command goto-line-relative (bug#5042, bug#9917)
...
* lisp/simple.el (goto-line-read-args): New function with code from goto-line.
(goto-line): New arg RELATIVE. Also use 'widen-automatically' to
leave all lines accessible in the narrowed buffer.
(goto-line-relative): New command.
* lisp/info.el (Info-mode-map): Remap 'goto-line' to 'goto-line-relative'.
* doc/emacs/basic.texi (Moving Point):
* doc/emacs/display.texi (Optional Mode Line): Mention goto-line-relative.
2020-09-23 22:39:32 +03:00
Stefan Kangas
ad285e0eb8
Remove TODO to convert files to unit tests
...
* test/lisp/textmodes/css-mode-tests.el:
* test/lisp/progmodes/ruby-mode-tests.el: Remove TODO to convert test
files into unit tests. The files are still useful for debugging.
Ref: https://lists.gnu.org/r/emacs-devel/2020-09/msg01906.html
2020-09-23 20:53:06 +02:00
Stefan Kangas
37a2a427e4
Convert some completion.el tests to ERT
...
* test/lisp/completion-tests.el: New file.
* lisp/completion.el: Move commented out tests to completion-tests.el.
2020-09-23 20:03:19 +02:00
Stefan Kangas
610b771d4a
Convert allout unit tests to ERT
...
* test/lisp/allout-tests.el: New file.
* lisp/allout.el (allout-run-unit-tests-on-load)
(allout-run-unit-tests): Remove.
(allout-tests-obliterate-variable)
(allout-tests-globally-unbound, allout-tests-globally-true)
(allout-tests-locally-true, allout-test-resumptions): Move to
allout-tests.el
* test/lisp/allout-widgets-tests.el: New file.
* lisp/allout-widgets.el (allout-widgets-run-unit-tests-on-load)
(allout-widgets-run-unit-tests): Remove.
(allout-test-range-overlaps): Move to allout-widgets-tests.el.
2020-09-23 20:03:19 +02:00
Stefan Kangas
acf958667b
* lisp/repeat.el: Remove obsolete comment.
2020-09-23 20:03:19 +02:00
Michael Albinus
441e875019
* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Adapt test.
2020-09-23 19:57:03 +02:00
Mattias Engdegård
3bfddaec3a
; * lisp/emacs-lisp/lisp.el: rename parameter in last change
2020-09-23 18:08:32 +02:00
Mattias Engdegård
df0f32f048
Don't signal scan-error when moving by sexp interactively
...
* lisp/emacs-lisp/lisp.el (forward-sexp, backward-sexp, forward-list)
(backward-list, down-list, up-list, mark-sexp, kill-sexp)
(backward-kill-sexp): Remove unsightly scan-error when running
interactively and no further movement by sexp can be made (bug#43489).
2020-09-23 16:31:18 +02:00
Mauro Aranda
b252e09ae4
Allow the newline character in the character widget (Bug#15925)
...
* lisp/wid-edit.el (widget-specify-field): Extend check for adding the
boundary overlay. Plus, a minor comment indentation fix.
(character widget): Tweak the valid-regexp to allow the newline
character.
* test/lisp/wid-edit-tests.el (widget-test-character-widget-value)
(widget-test-editable-field-widget-value): New tests (bug#15925).
2020-09-23 15:45:36 +02:00
Andrew G Cohen
6037051f49
Improve mark handling in gnus nnselect
...
* lisp/gnus/nnselect.el (numbers-by-group,
nnselect-request-update-info, nnselect-push-info): Handle all three
mark types ('tuple, 'range, 'list) and general speedups.
2020-09-23 19:52:38 +08:00
Alan Mackenzie
e4831151c2
Handle escaped comment enders correctly in syntax.c, fixing bug #43558
...
This fixes forward-comment, scan-lists, and parse-partial-sexp.
* src/syntax.c (forw_comment): Detect and skip an escaped comment ender
(e.g. \*/ in C) when comment-end-can-be-escaped is non-nil.
2020-09-23 08:52:34 +00:00
Andrew G Cohen
80b0a69b60
Run gnus-parse-headers-hook when retrieving nnselect headers
...
* lisp/gnus/nnselect.el (nnselect-retrieve-headers): Run the
gnus-parse-headers-hook when retrieving headers in nnselect, just like
in a real group.
2020-09-23 16:46:36 +08:00
Stefan Monnier
83a4e4c2a9
test/src/xdisp-tests.el: New file
2020-09-22 23:55:45 -04:00
Andrew G Cohen
8af6b01d10
Use gnus-extra-headers in nnselect header parsing
...
* lisp/gnus/nnselect.el (nnselect-retrieve-headers): Bind
nnmail-extra-headers to gnus-extra-headers before parsing retrieved
headers.
2020-09-23 08:25:56 +08:00
Lars Ingebrigtsen
44bb59f79e
Ensure that the game directory exists before trying to write to it
...
* lisp/play/gamegrid.el (gamegrid-add-score-insecure): Make the
directory if it doesn't exist (bug#37836).
2020-09-22 17:32:51 +02:00
martin rudalics
10696d0ac5
Make delete-pair only delete pairs that are part of insert-pair-alist
...
* lisp/emacs-lisp/lisp.el (delete-pair): Only delete pairs that
are part of `insert-pair-alist' (bug#4136).
2020-09-22 16:44:15 +02:00
Lars Ingebrigtsen
73f77558cc
Fix off-by-one error in eldoc--handle-docs
...
* lisp/emacs-lisp/eldoc.el (eldoc--handle-docs): We have one extra
line to use if we don't show the truncation message (bug#43543).
2020-09-22 16:20:05 +02:00
Lars Ingebrigtsen
096f5956be
Speed up shr-insert slightly
...
* lisp/net/shr.el (shr-insert): Speed up regularising spaces --
the vast majority of the spaces are already OK, so transforming
" " to " " just takes time.
2020-09-22 16:02:42 +02:00
Lars Ingebrigtsen
69b5d54311
Fix filling problem in shr due to zero-width id tagging
...
* lisp/net/shr.el (shr-descend): Fix problem with filling lines
that have a zero-width ID tag at the start.
2020-09-22 16:02:42 +02:00
Eli Zaretskii
de6844b624
Fix cursor display in mini-window under icomplete-mode
...
* src/xdisp.c (resize_mini_window): When we show only part of the
mini-window's contents, make sure the window-start position is at
the beginning of a screen line. (Bug#43519)
2020-09-22 16:52:18 +03:00
David Reitter
c5c29a9f0f
Fix font-panel on NS (bug#43480)
...
* lisp/term/ns-win.el (ns-respond-to-change-font): Set the font using
customize.
2020-09-22 13:38:16 +01:00
Stefan Kangas
11a1c8b62f
Remove broken compat code from EDE
...
* lisp/cedet/ede/detect.el: Remove broken Emacs 24.1 compat code.
This would never have worked, since the fallback library is missing.
2020-09-22 13:40:40 +02:00
Mattias Engdegård
3376b08c2e
; * test/lisp/progmodes/ps-mode-tests.el: Add missing backslash
2020-09-22 12:32:12 +02:00
Stefan Kangas
797ff44d53
Fix shellcheck warning
...
* build-aux/update-subdirs: Fix issue indicated by the shellcheck
linter (warning SC2046).
2020-09-22 02:44:47 +02:00
Stefan Kangas
2788557000
Support shellcheck in compilation-mode
...
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add shellcheck regexp.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data):
(compile-test-error-regexps): Add test for shellcheck.
* etc/compilation.txt: Add shellcheck example.
* etc/NEWS: Announce the change.
foo
2020-09-22 02:44:47 +02:00
Stefan Kangas
c0188959c1
Remove Emacs 23 compat code from cedet
...
* lisp/cedet/ede/proj-elisp.el (project-compile-target):
* lisp/cedet/semantic/bovine/grammar.el (bovine-grammar-expand-form):
* lisp/cedet/semantic/ede-grammar.el (project-compile-target):
Remove Emacs 23 compat code.
2020-09-22 01:01:36 +02:00
Stefan Kangas
e1290f4713
Remove some Emacs 20 compat code
...
* lisp/apropos.el (apropos-local-value):
* lisp/progmodes/antlr-mode.el (antlr-mode-menu):
* lisp/progmodes/idlwave.el (idlwave-attach-classes):
* lisp/textmodes/artist.el (artist-replace-chars): Remove Emacs 20
compat code.
2020-09-22 01:01:36 +02:00
Stefan Kangas
9a3a2a00da
Remove some unnecessary compat code
...
* test/lisp/emacs-lisp/ert-x-tests.el (ert-test-describe-test):
* test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01):
Remove unnecessary compat code; these tests should never need to run
on older versions of Emacs.
2020-09-22 01:00:06 +02:00
Stefan Kangas
83b0fc4429
Fix thinko in dired-change-marks
...
* lisp/dired.el (dired-change-marks): Fix my previous broken attempt
to declare advertised-calling-convention.
2020-09-22 00:35:05 +02:00
Stefan Kangas
fb68645b5a
Move several completions from eshell to pcomplete (Bug#10585)
...
* lisp/eshell/em-unix.el (eshell-complete-hostname)
(pcomplete/ftp, pcomplete/ncftp, pcomplete/ping)
(pcomplete/rlogin, pcomplete/telnet, pcomplete/rsh):
Move from here...
* lisp/pcmpl-unix.el (pcmpl-unix-complete-hostname)
(pcomplete/ftp, pcomplete/ncftp, pcomplete/ping)
(pcomplete/rlogin, pcomplete/telnet, pcomplete/rsh):
...to here. Make old names into aliases.
* lisp/eshell/esh-util.el (eshell-hosts-file)
(eshell-host-names, eshell-host-timestamp)
(eshell-read-hosts-file, eshell-read-hosts)
(eshell-read-host-names): Move from here...
* lisp/pcomplete.el (pcomplete-hosts-file)
(pcomplete--host-name-cache)
(pcomplete--host-name-cache-timestamp)
(pcomplete-read-hosts-file, pcomplete-read-hosts)
(pcomplete-read-host-names): ...to here. Make old names into
aliases.
* lisp/eshell/em-unix.el (eshell-complete-host-reference): Update
caller.
2020-09-21 20:38:56 +02:00
Stefan Kangas
600d3f0669
Move pcomplete/bcc32 from eshell to pcmpl-x (Bug#10585)
...
* lisp/eshell/em-xtra.el (pcomplete/bcc32, pcomplete/bcc): Move
from here...
* lisp/pcmpl-x.el (pcomplete/bcc32, pcomplete/bcc): ...to here.
2020-09-21 20:38:56 +02:00
Stefan Kangas
9fff5491c3
Convert a manual test for nxml-mode to unit test
...
* test/manual/indent/nxml.xml: Delete file.
* test/lisp/nxml/nxml-mode-tests.el
(nxml-mode-test-comment-bug-17264): New test based on deleted file.
2020-09-21 18:47:55 +02:00
Stefan Kangas
b63c3535b0
Convert manual indent test for ruby-mode into unit test
...
* test/manual/indent/ruby.rb: Move from here...
* test/lisp/progmodes/ruby-mode-resources/ruby.rb: ...to here.
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-mode-tests-data-dir): New variable.
(ruby--indent/converted-from-manual-test): New test.
2020-09-21 18:47:55 +02:00
Stefan Kangas
1d98bed6c3
Convert manual indent test for scheme-mode into unit test
...
* test/manual/indent/scheme.scm: Delete file.
* test/lisp/progmodes/scheme-tests.el: New file with unit test for
scheme-mode based on deleted file.
2020-09-21 18:47:55 +02:00