]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoClean-up some now unnecessary diff against master
Andrea Corallo [Mon, 28 Sep 2020 15:20:55 +0000 (17:20 +0200)]
Clean-up some now unnecessary diff against master

* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
.eln files have been moved so remove the '.eln' match.

* lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded):
Likewise.

* lisp/emacs-lisp/find-func.el (find-library-suffixes): Clean-up
as '.eln' is no more in `load-suffixes'.

* lisp/help-fns.el (find-lisp-object-file-name): Clean-up as
`symbol-file' will return the '.elc' file.

* src/lread.c (Fget_load_suffixes): Remove logic as '.eln' is not
anymore in load-suffixes.
(openp): Two spaces.

4 years agoAlways set 'Vexec_path' before 'Vinvocation_directory' (bug#43137)
Andrea Corallo [Sat, 26 Sep 2020 13:12:30 +0000 (15:12 +0200)]
Always set 'Vexec_path' before 'Vinvocation_directory' (bug#43137)

Do this as depending on the OS if argv0 is not populated 'Vexec_path'
is used to infer 'Vinvocation_directory'.

      * src/pdumper.c (pdumper_load): Invoke 'init_vars_for_load' instead
of 'set_invocation_vars'.

* src/lisp.h: Extern 'init_vars_for_load' instead of
'set_invocation_vars' .

* src/emacs.c (set_invocation_vars): Make it static and remove
double invocation guard.
(init_vars_for_load): Wrap 'init_callproc_1' and 'set_invocation_vars'
calls + add double invocation guard.
(init_cmdargs): Move out 'set_invocation_vars' invocation.
(main): Call 'init_vars_for_load' instead of 'init_callproc_1'.

4 years ago* lisp/emacs-lisp/cl-macs.el (cl--optimize): Add a FIXME.
Andrea Corallo [Sat, 26 Sep 2020 12:28:36 +0000 (14:28 +0200)]
* lisp/emacs-lisp/cl-macs.el (cl--optimize): Add a FIXME.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Sat, 26 Sep 2020 13:31:50 +0000 (15:31 +0200)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoSilence some byte-compiler warnings
Stefan Kangas [Sat, 26 Sep 2020 09:34:20 +0000 (11:34 +0200)]
Silence some byte-compiler warnings

* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
* test/lisp/custom-tests.el (cus-test-opts):
* test/lisp/help-fns-tests.el (foo-test-map)
(help-fns-test--describe-keymap-foo):
* test/src/fns-tests.el (w32-collate-ignore-punctuation)
(fns-tests-func-arity): Silence byte-compiler warnings.

4 years agoRepurpose libxml test for obsolete argument
Stefan Kangas [Sat, 26 Sep 2020 09:27:48 +0000 (11:27 +0200)]
Repurpose libxml test for obsolete argument

* test/src/xml-tests.el (libxml-tests): Move half this test for the
recently obsoleted fourth argument to libxml-parse-xml-region...
* test/lisp/xml-tests.el (xml-tests--remove-comments): ...to a new
test here for xml-remove-comments.

* test/src/xml-tests.el (libxml-tests--data-comments-discarded):
Move test data from here...
* test/lisp/xml-tests.el (xml-tests--data-with-comments): ...to here.

4 years ago* etc/NEWS: Add new D-Bus monitor functionality. Fix typos.
Michael Albinus [Sat, 26 Sep 2020 09:38:53 +0000 (11:38 +0200)]
* etc/NEWS: Add new D-Bus monitor functionality.  Fix typos.

4 years agoAdd D-Bus monitor
Michael Albinus [Sat, 26 Sep 2020 09:38:23 +0000 (11:38 +0200)]
Add D-Bus monitor

* lisp/net/dbus.el (dbus-interface-monitoring): New defconst.
(dbus-call-method, dbus-call-method-asynchronously)
(dbus-send-signal, dbus-method-return-internal)
(dbus-method-error-internal, dbus-check-arguments): Accept also
:system-private and :session-private.
(dbus-check-event, dbus-event-path-name)
(dbus-event-interface-name)
(dbus-event-member-name, dbus-property-handler)
(dbus-handle-bus-disconnect): Adapt according to new structure.
(dbus-handle-event): Handle also monitor events.
(dbus-event-destination-name, dbus-event-handler)
(dbus-event-arguments, dbus-register-monitor, dbus-monitor-handler):
New defuns.

* src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS, xd_remove_watch)
(Fdbus__init_bus): Accept also :system-private and :session-private.
(xd_read_message_1): Add destination and error_name to
dbus-event.  Handle monitor events.
(syms_of_dbusbind): Declare QCsystem_private, QCsession_private
and QCmonitor.
(dbus-registered-objects-table): Fix docstring.

4 years agoFix byte-compiler warning in CEDET
Stefan Kangas [Sat, 26 Sep 2020 08:50:12 +0000 (10:50 +0200)]
Fix byte-compiler warning in CEDET

* lisp/cedet/semantic/lex.el (semantic-lex-catch-errors): Fix
byte-compiler warning by removing obsolete variable.

4 years agosoap-client.el: Prevent some invalid encoding warnings
Thomas Fitzsimmons [Sat, 26 Sep 2020 02:57:25 +0000 (22:57 -0400)]
soap-client.el: Prevent some invalid encoding warnings

* lisp/net/soap-client.el (soap-encode-xs-complex-type): Do not
warn about missing non-nillable slot if type iself is optional.

4 years agoFix out-of-tree make check
Glenn Morris [Fri, 25 Sep 2020 18:01:14 +0000 (11:01 -0700)]
Fix out-of-tree make check

* test/lisp/custom-tests.el (custom-test-admin-cus-test): New const.
(check-for-wrong-custom-types): Use it.

4 years agoTidy up NS color handling
Alan Third [Fri, 25 Sep 2020 16:12:51 +0000 (17:12 +0100)]
Tidy up NS color handling

* src/nsimage.m (COLORSPACE_NAME): New macro to find the current
colorspace.
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]):
([EmacsImage initForXPMWithDepth:width:height:]): Use the current
colorspace.
* src/nsterm.h (NSAppKitVersionNumber10_7):
(NSAppKitVersionNumber10_10): Define for macOS version checks.
* src/nsterm.m ([NSColor colorForEmacsRed:green:blue:alpha:]): Tidy up
the version checking.
([NSColor colorUsingDefaultColorSpace]): Tidy the version checking and
use [NSColor colorUsingColorSpace:] with GNUstep.

4 years agoRemove obsolete macOS support for NS font backend
Alan Third [Fri, 25 Sep 2020 13:32:56 +0000 (14:32 +0100)]
Remove obsolete macOS support for NS font backend

The ns font backend is has been disabled on macOS for a long time and
doesn't work correctly even if re-enabled.

* src/nsfont.m:
(ns_char_width):
(ns_ascii_average_width):
(ns_get_covering_families):
(nsfont_open):
(nsfont_close):
(nsfont_draw):
(ns_uni_to_glyphs):
(ns_glyph_metrics):
(EmacsGlyphStorage): Remove all Cocoa only code.
* src/nsterm.h (EmacsGlyphStorage): Remove.
(struct nsfont_info): Make GNUstep only.
* src/nsterm.m (ns_compute_glyph_string_overhangs): Remove GNUstep
only code from Cocoa builds.

4 years agoImplement internal border colors on NS (bug#41071)
Alan Third [Wed, 23 Sep 2020 12:57:50 +0000 (13:57 +0100)]
Implement internal border colors on NS (bug#41071)

* src/nsterm.m (ns_clear_under_internal_border): New function.
(ns_after_update_window_line): Use the correct background color.
(ns_redisplay_interface): Add ns_clear_under_internal_border.

4 years agostring-search robustness and documentation improvement (bug#43598)
Mattias Engdegård [Fri, 25 Sep 2020 15:00:17 +0000 (17:00 +0200)]
string-search robustness and documentation improvement (bug#43598)

* src/fns.c (Fstring_search): Check START-POS argument range.
Simplify logic.  Improve doc string.
* test/src/fns-tests.el (string-search): Add test cases.
* doc/lispref/strings.texi (Text Comparison): Elaborate.
* lisp/emacs-lisp/byte-opt.el (pure-fns): Mark string-search as pure.

4 years ago* CONTRIBUTE: Don't recommend action stamps
Noam Postavsky [Fri, 25 Sep 2020 14:10:56 +0000 (16:10 +0200)]
* CONTRIBUTE: Don't recommend action stamps

* CONTRIBUTE: Remove mention of the "action stamp" thing (bug#20609).

4 years agoPartially revert previous prolog.el cleanup
Lars Ingebrigtsen [Fri, 25 Sep 2020 14:06:35 +0000 (16:06 +0200)]
Partially revert previous prolog.el cleanup

* lisp/progmodes/prolog.el (prolog-font-lock-keywords): Partially
revert previous patch -- we want the prolog-warning-face symbol,
not its value.

4 years agoFix defcustom type in sql.el for sql-postgres-login-params
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:42:35 +0000 (15:42 +0200)]
Fix defcustom type in sql.el for sql-postgres-login-params

* lisp/progmodes/sql.el (sql-login-params): Fix defcustom type to
match sql-postgres-login-params value.

4 years agoFix a defcustom type in gdb-mi.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:38:53 +0000 (15:38 +0200)]
Fix a defcustom type in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-display-source-buffer-action): Fix
defcustom type to match the value.

4 years agoFix defcustom type in whitespace.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:35:23 +0000 (15:35 +0200)]
Fix defcustom type in whitespace.el

* lisp/whitespace.el (whitespace-space-after-tab-regexp)
(whitespace-indentation-regexp): The first string here isn't a
regexp, it's a string (that's expanded with format to be a regexp).

4 years agoFix the defcustom type fix in python.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:17:36 +0000 (15:17 +0200)]
Fix the defcustom type fix in python.el

* lisp/progmodes/python.el (python-pdbtrack-exit-command): Fix
defcustom type (bug#30990).

4 years agoFix some defcustom types
Lars Ingebrigtsen [Fri, 25 Sep 2020 13:15:21 +0000 (15:15 +0200)]
Fix some defcustom types

* lisp/whitespace.el (whitespace-style):
* lisp/gnus/message.el (message-screenshot-command):
* lisp/progmodes/compile.el (compilation-transform-file-match-alist):
* lisp/progmodes/gdb-mi.el (gdb-default-window-configuration-file):
* lisp/progmodes/python.el (python-pdbtrack-exit-command): Fix the
defcustom types.
* lisp/progmodes/sql.el (sql-password-wallet): Fix the value.

4 years agoAdd an expensive test for defcustom types
Lars Ingebrigtsen [Fri, 25 Sep 2020 12:46:36 +0000 (14:46 +0200)]
Add an expensive test for defcustom types

* admin/cus-test.el (cus-test-opts): Return the tests.

* test/lisp/custom-tests.el (check-for-wrong-custom-types): Test
custom types (bug#30990).

4 years agoMark string-search as being side effect free
Lars Ingebrigtsen [Fri, 25 Sep 2020 12:30:13 +0000 (14:30 +0200)]
Mark string-search as being side effect free

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add
string-search.

4 years agoMake the Man completion code work better if man -k fails
Noam Postavsky [Fri, 25 Sep 2020 11:39:24 +0000 (13:39 +0200)]
Make the Man completion code work better if man -k fails

* lisp/man.el (Man-completion-table): Check the return code for
"man -k" and assume it failed if there's a non-zero exit code
(bug#16722).

4 years agoUse the char history in zap-up-to-char
Tino Calancha [Fri, 25 Sep 2020 11:25:08 +0000 (13:25 +0200)]
Use the char history in zap-up-to-char

* lisp/misc.el (zap-up-to-char): Use read-char-from-minibuffer
(bug#39154).

4 years agoFix replace-in-string infloop with empty pattern string (bug#43598)
Mattias Engdegård [Fri, 25 Sep 2020 11:15:42 +0000 (13:15 +0200)]
Fix replace-in-string infloop with empty pattern string (bug#43598)

* lisp/subr.el (replace-in-string): Raise an error if FROMSTRING is
empty.
* test/lisp/subr-tests.el (replace-in-string): Add test case.

4 years agoTweak updating the process mark in set-process-buffer
Lars Ingebrigtsen [Fri, 25 Sep 2020 09:47:59 +0000 (11:47 +0200)]
Tweak updating the process mark in set-process-buffer

* src/process.c (Fset_process_buffer): Only update the process
mark if we actually change the buffer.

4 years agoRemove more compat code from prolog.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 09:37:45 +0000 (11:37 +0200)]
Remove more compat code from prolog.el

* lisp/progmodes/prolog.el (prolog-font-lock-keywords): Remove
compat test for a face that's always defined.

4 years ago* lisp/progmodes/ruby-mode.el (ruby-use-smie): Declare obsolete
Stefan Monnier [Fri, 25 Sep 2020 03:02:06 +0000 (23:02 -0400)]
* lisp/progmodes/ruby-mode.el (ruby-use-smie): Declare obsolete

(ruby-mode-map, ruby-mode-menu): Don't use ruby-for/backward-sexp any more.
(ruby-mode-variables): Always setup SMIE navigation.
Still obey `ruby-use-smie` for indentation.
(ruby-forward-sexp, ruby-backward-sexp): Mark as obsolete.

4 years agoRemove some XEmacs compat code from prolog.el
Lars Ingebrigtsen [Fri, 25 Sep 2020 01:46:59 +0000 (03:46 +0200)]
Remove some XEmacs compat code from prolog.el

* lisp/progmodes/prolog.el (prolog-replace-in-string): Remove XEmacs
compat code and make obsolete.
(prolog-guess-fill-prefix): Adjust callers.
(prolog-uncomment-region): Make obsolete.
(prolog-mode-syntax-table): syntax-propertize-rules is always defined.
(prolog-syntax-propertize-function): Ditto.
(prolog-face-name-p): Make into obsolete alias.
(prolog-font-lock-keywords): Adjust callers.

4 years agoClean up replace-in-string slightly
Lars Ingebrigtsen [Fri, 25 Sep 2020 00:27:01 +0000 (02:27 +0200)]
Clean up replace-in-string slightly

* lisp/subr.el (replace-in-string): Clean up previous fix slightly.

4 years agoFix previous replace-in-string rewrite
Lars Ingebrigtsen [Fri, 25 Sep 2020 00:07:05 +0000 (02:07 +0200)]
Fix previous replace-in-string rewrite

* lisp/subr.el (replace-in-string): Fix logic errors in previous
patch.

4 years agoFix replace-in-string multibyteness problems with string-search
Lars Ingebrigtsen [Thu, 24 Sep 2020 23:53:07 +0000 (01:53 +0200)]
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).

4 years agoAdd a new function 'string-search'
Lars Ingebrigtsen [Thu, 24 Sep 2020 23:52:10 +0000 (01:52 +0200)]
Add a new function 'string-search'

* doc/lispref/strings.texi (Text Comparison): Document it.
* src/fns.c (Fstring_search): New function.

4 years ago* lisp/help-fns.el (help-fns--first-release): Use etc/NEWS as well
Stefan Monnier [Thu, 24 Sep 2020 22:15:39 +0000 (18:15 -0400)]
* lisp/help-fns.el (help-fns--first-release): Use etc/NEWS as well

4 years agoUpdate a failing lisp test
Glenn Morris [Thu, 24 Sep 2020 18:56:09 +0000 (11:56 -0700)]
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.

4 years agoHorizontal scrolling for mouse wheel with Shift modifier (bug#43568)
Juri Linkov [Thu, 24 Sep 2020 19:25:03 +0000 (22:25 +0300)]
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.

4 years agoSet mwheel default scroll value to 1 (bug#43380)
Theodor Thornhill [Thu, 24 Sep 2020 18:59:30 +0000 (21:59 +0300)]
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.

4 years ago* lisp/simple.el (goto-line-read-args): More relevant default line number.
Juri Linkov [Thu, 24 Sep 2020 18:52:22 +0000 (21:52 +0300)]
* lisp/simple.el (goto-line-read-args): More relevant default line number.

4 years agoAdd skip condition for some dbus tests
Glenn Morris [Thu, 24 Sep 2020 18:47:11 +0000 (11:47 -0700)]
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

4 years agoMake set-process-buffer also update the process mark
Lars Ingebrigtsen [Thu, 24 Sep 2020 15:14:25 +0000 (17:14 +0200)]
Make set-process-buffer also update the process mark

* src/process.c (Fset_process_buffer): Update the process mark
(bug#43573).

4 years agoRefactor process mark setting
Lars Ingebrigtsen [Thu, 24 Sep 2020 15:08:30 +0000 (17:08 +0200)]
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.

4 years agoAdd sanity check for Gnus groups that belong to no topic
dickmao [Thu, 24 Sep 2020 14:48:11 +0000 (16:48 +0200)]
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).

4 years agoFix last change in resize_mini_window
Eli Zaretskii [Thu, 24 Sep 2020 14:13:43 +0000 (17:13 +0300)]
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)

4 years agoFix recent simple.el compilation warning
Lars Ingebrigtsen [Thu, 24 Sep 2020 13:50:25 +0000 (15:50 +0200)]
Fix recent simple.el compilation warning

* lisp/simple.el (goto-line-relative): Suppress byte compilation
warning about goto-line.

4 years agoMinor Tramp cleanup
Michael Albinus [Thu, 24 Sep 2020 08:17:03 +0000 (10:17 +0200)]
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.

4 years agoRename comp--subr-safe-advice -> comp-subr-safe-advice
Andrea Corallo [Wed, 23 Sep 2020 20:01:45 +0000 (22:01 +0200)]
Rename comp--subr-safe-advice -> comp-subr-safe-advice

* lisp/emacs-lisp/comp.el (comp-subr-safe-advice): Rename
comp--subr-safe-advice -> comp-subr-safe-advice.
* lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise.
* lisp/emacs-lisp/advice.el (ad-add-advice): Likewise.

4 years ago* lisp/emacs-lisp/comp.el (comp-body-eff): Improve style.
Andrea Corallo [Wed, 23 Sep 2020 19:50:20 +0000 (21:50 +0200)]
* lisp/emacs-lisp/comp.el (comp-body-eff): Improve style.

4 years agoDo not install a subr trampoline twice
Andrea Corallo [Wed, 23 Sep 2020 19:56:52 +0000 (21:56 +0200)]
Do not install a subr trampoline twice

* src/comp.c (syms_of_comp): Define and initialize
'Vcomp_installed_trampolines_h'.
(Fcomp__install_trampoline): Fill 'Vcomp_installed_trampolines_h'
* lisp/emacs-lisp/comp.el (comp--subr-safe-advice): Make use of
`comp-installed-trampolines-h' to guard against installing a
trampoline twice.

4 years ago* lisp/emacs-lisp/comp.el (comp-never-optimize-functions): Clean-up.
Andrea Corallo [Wed, 23 Sep 2020 07:50:01 +0000 (09:50 +0200)]
* lisp/emacs-lisp/comp.el (comp-never-optimize-functions): Clean-up.

4 years agoAdd a test for primitive advicing effectiveness
Andrea Corallo [Wed, 23 Sep 2020 07:36:49 +0000 (09:36 +0200)]
Add a test for primitive advicing effectiveness

* test/src/comp-test-funcs.el (comp-test-primitive-advice-f): New
function.
* test/src/comp-tests.el (comp-test-primitive-advice): New test.

4 years agoCall `comp--subr-safe-advice' from the advice machinery
Andrea Corallo [Sat, 19 Sep 2020 20:33:34 +0000 (22:33 +0200)]
Call `comp--subr-safe-advice' from the advice machinery

* lisp/emacs-lisp/nadvice.el (advice--add-function): Call
`comp--subr-safe-advice' when necessary.

* lisp/emacs-lisp/advice.el (ad-add-advice): Likewhise.

4 years ago* Add `comp--subr-safe-advice' entry point
Andrea Corallo [Sat, 19 Sep 2020 12:52:50 +0000 (14:52 +0200)]
* Add `comp--subr-safe-advice' entry point

Add a Lisp side entry-point to be called to make primitive adivicing
effective.

* lisp/emacs-lisp/comp.el (comp-trampoline-sym)
(comp-trampoline-filename): New substs.
(comp-make-lambda-list-from-subr, comp-search-trampoline)
(comp-tampoline-compile): New functions

4 years agoWrite Gnus active files with quotes around group names
Eric Abrahamsen [Wed, 23 Sep 2020 23:01:38 +0000 (16:01 -0700)]
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.

4 years agoNew command goto-line-relative (bug#5042, bug#9917)
Juri Linkov [Wed, 23 Sep 2020 19:39:32 +0000 (22:39 +0300)]
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.

4 years ago* Add `comp--install-trampoline' machinery
Andrea Corallo [Sat, 19 Sep 2020 14:44:53 +0000 (16:44 +0200)]
* Add `comp--install-trampoline' machinery

* src/comp.c (Fcomp__install_trampoline): New function to
install a subr trampoline into the function relocation table.
Once this is done any call from native compiled Lisp to the
related primitive will go through the `funcall' trampoline
making advicing effective.

4 years agoMake CHECK_SUBR public
Andrea Corallo [Sat, 19 Sep 2020 14:13:56 +0000 (16:13 +0200)]
Make CHECK_SUBR public

* src/data.c (CHECK_SUBR): Move from here to...
* src/lisp.h (CHECK_SUBR): ...to here.

4 years agoRemove TODO to convert files to unit tests
Stefan Kangas [Wed, 23 Sep 2020 18:53:06 +0000 (20:53 +0200)]
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

4 years ago* lisp/emacs-lisp/comp.el (comp-final): Log when interactively invoked.
Andrea Corallo [Wed, 23 Sep 2020 18:48:23 +0000 (20:48 +0200)]
* lisp/emacs-lisp/comp.el (comp-final): Log when interactively invoked.

4 years ago* lisp/emacs-lisp/comp.el (native-compile): Add OUTPUT parameter.
Andrea Corallo [Sat, 19 Sep 2020 10:31:03 +0000 (12:31 +0200)]
* lisp/emacs-lisp/comp.el (native-compile): Add OUTPUT parameter.

4 years agoConvert some completion.el tests to ERT
Stefan Kangas [Wed, 23 Sep 2020 17:41:59 +0000 (19:41 +0200)]
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.

4 years agoConvert allout unit tests to ERT
Stefan Kangas [Wed, 23 Sep 2020 16:14:54 +0000 (18:14 +0200)]
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.

4 years ago* lisp/repeat.el: Remove obsolete comment.
Stefan Kangas [Wed, 23 Sep 2020 14:22:49 +0000 (16:22 +0200)]
* lisp/repeat.el: Remove obsolete comment.

4 years ago* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Adapt test.
Michael Albinus [Wed, 23 Sep 2020 17:57:03 +0000 (19:57 +0200)]
* test/lisp/net/dbus-tests.el (dbus-test01-basic-types): Adapt test.

4 years ago; * lisp/emacs-lisp/lisp.el: rename parameter in last change
Mattias Engdegård [Wed, 23 Sep 2020 16:08:32 +0000 (18:08 +0200)]
; * lisp/emacs-lisp/lisp.el: rename parameter in last change

4 years agoDon't signal scan-error when moving by sexp interactively
Mattias Engdegård [Fri, 18 Sep 2020 10:49:33 +0000 (12:49 +0200)]
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).

4 years agoAllow the newline character in the character widget (Bug#15925)
Mauro Aranda [Wed, 23 Sep 2020 13:45:29 +0000 (15:45 +0200)]
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).

4 years agoImprove mark handling in gnus nnselect
Andrew G Cohen [Wed, 23 Sep 2020 11:47:15 +0000 (19:47 +0800)]
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.

4 years agoHandle escaped comment enders correctly in syntax.c, fixing bug #43558
Alan Mackenzie [Wed, 23 Sep 2020 08:50:11 +0000 (08:50 +0000)]
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.

4 years agoRun gnus-parse-headers-hook when retrieving nnselect headers
Andrew G Cohen [Wed, 23 Sep 2020 08:46:36 +0000 (16:46 +0800)]
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.

4 years agotest/src/xdisp-tests.el: New file
Stefan Monnier [Wed, 23 Sep 2020 03:55:45 +0000 (23:55 -0400)]
test/src/xdisp-tests.el: New file

4 years agoUse gnus-extra-headers in nnselect header parsing
Andrew G Cohen [Wed, 23 Sep 2020 00:25:56 +0000 (08:25 +0800)]
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.

4 years agoEnsure that the game directory exists before trying to write to it
Lars Ingebrigtsen [Tue, 22 Sep 2020 15:32:51 +0000 (17:32 +0200)]
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).

4 years agoMake delete-pair only delete pairs that are part of insert-pair-alist
martin rudalics [Tue, 22 Sep 2020 14:44:15 +0000 (16:44 +0200)]
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).

4 years agoFix off-by-one error in eldoc--handle-docs
Lars Ingebrigtsen [Tue, 22 Sep 2020 14:20:05 +0000 (16:20 +0200)]
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).

4 years agoSpeed up shr-insert slightly
Lars Ingebrigtsen [Tue, 22 Sep 2020 14:02:37 +0000 (16:02 +0200)]
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.

4 years agoFix filling problem in shr due to zero-width id tagging
Lars Ingebrigtsen [Tue, 22 Sep 2020 13:10:30 +0000 (15:10 +0200)]
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.

4 years agoFix cursor display in mini-window under icomplete-mode
Eli Zaretskii [Tue, 22 Sep 2020 13:52:18 +0000 (16:52 +0300)]
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)

4 years ago* Fix MacOS Emacs.app installation (bug#43532)
Andrea Corallo [Mon, 21 Sep 2020 19:07:04 +0000 (21:07 +0200)]
* Fix MacOS Emacs.app installation (bug#43532)

* src/comp.c (Fcomp_el_to_eln_filename): Adapt the filename
hashing algorithm to allow for producing a MacOS self-contained
Emacs.app.

4 years agoFix font-panel on NS (bug#43480)
David Reitter [Tue, 22 Sep 2020 12:38:16 +0000 (13:38 +0100)]
Fix font-panel on NS (bug#43480)

* lisp/term/ns-win.el (ns-respond-to-change-font): Set the font using
customize.

4 years agoRemove broken compat code from EDE
Stefan Kangas [Tue, 22 Sep 2020 11:40:40 +0000 (13:40 +0200)]
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.

4 years ago; * test/lisp/progmodes/ps-mode-tests.el: Add missing backslash
Mattias Engdegård [Tue, 22 Sep 2020 10:32:12 +0000 (12:32 +0200)]
; * test/lisp/progmodes/ps-mode-tests.el: Add missing backslash

4 years agoFix shellcheck warning
Stefan Kangas [Tue, 22 Sep 2020 00:33:42 +0000 (02:33 +0200)]
Fix shellcheck warning

* build-aux/update-subdirs: Fix issue indicated by the shellcheck
linter (warning SC2046).

4 years agoSupport shellcheck in compilation-mode
Stefan Kangas [Tue, 22 Sep 2020 00:04:15 +0000 (02:04 +0200)]
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

4 years agoRemove Emacs 23 compat code from cedet
Stefan Kangas [Mon, 21 Sep 2020 22:58:59 +0000 (00:58 +0200)]
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.

4 years agoRemove some Emacs 20 compat code
Stefan Kangas [Mon, 21 Sep 2020 22:57:22 +0000 (00:57 +0200)]
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.

4 years agoRemove some unnecessary compat code
Stefan Kangas [Mon, 21 Sep 2020 22:54:54 +0000 (00:54 +0200)]
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.

4 years agoFix thinko in dired-change-marks
Stefan Kangas [Mon, 21 Sep 2020 22:35:05 +0000 (00:35 +0200)]
Fix thinko in dired-change-marks

* lisp/dired.el (dired-change-marks): Fix my previous broken attempt
to declare advertised-calling-convention.

4 years ago* Make use of use of `subr-primitive-p' in `find-function-library'
Andrea Corallo [Sat, 19 Sep 2020 20:42:16 +0000 (22:42 +0200)]
* Make use of use of `subr-primitive-p' in `find-function-library'

* lisp/emacs-lisp/find-func.el (find-function-library): Use
`subr-primitive-p'.

4 years ago* Sandbox syncronous libgccjit invocation on interactive sessions
Andrea Corallo [Sat, 19 Sep 2020 08:27:41 +0000 (10:27 +0200)]
* Sandbox syncronous libgccjit invocation on interactive sessions

Avoid unnecessary memory fragmentation/leakeage

* lisp/emacs-lisp/comp.el (comp-final1): New function.
(comp-final): Invoke `comp-final1' in a child process if in an
interactive session or directly otherwhise.

4 years agoMerge remote-tracking branch 'savannah/master' into HEAD
Andrea Corallo [Mon, 21 Sep 2020 19:45:02 +0000 (21:45 +0200)]
Merge remote-tracking branch 'savannah/master' into HEAD

4 years agoMove several completions from eshell to pcomplete (Bug#10585)
Stefan Kangas [Wed, 2 Sep 2020 00:45:39 +0000 (02:45 +0200)]
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.

4 years agoMove pcomplete/bcc32 from eshell to pcmpl-x (Bug#10585)
Stefan Kangas [Wed, 2 Sep 2020 00:34:43 +0000 (02:34 +0200)]
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.

4 years agoConvert a manual test for nxml-mode to unit test
Stefan Kangas [Mon, 21 Sep 2020 15:55:37 +0000 (17:55 +0200)]
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.

4 years agoConvert manual indent test for ruby-mode into unit test
Stefan Kangas [Mon, 21 Sep 2020 15:41:45 +0000 (17:41 +0200)]
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.

4 years agoConvert manual indent test for scheme-mode into unit test
Stefan Kangas [Mon, 21 Sep 2020 15:32:51 +0000 (17:32 +0200)]
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.

4 years agoConvert manual indent test for ps-mode into unit test
Stefan Kangas [Mon, 21 Sep 2020 15:19:48 +0000 (17:19 +0200)]
Convert manual indent test for ps-mode into unit test

* test/manual/indent/ps-mode.ps: Delete file.
* test/lisp/progmodes/ps-mode-tests.el (ps-mode-test-indent):
New unit test based on deleted file.

4 years ago(json-encode-string): Strip properties to fix bug#43549
Sam Steingold [Mon, 21 Sep 2020 15:50:29 +0000 (11:50 -0400)]
(json-encode-string): Strip properties to fix bug#43549

4 years agoFix problem with ede-mode bugging out on non-existent files
Lin Sun [Mon, 21 Sep 2020 15:33:13 +0000 (17:33 +0200)]
Fix problem with ede-mode bugging out on non-existent files

* lisp/cedet/ede/emacs.el: Check whether the directory exists in
ede-emacs-find-in-directories before using it (bug#43547).