1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

134818 commits

Author SHA1 Message Date
Stefan Monnier
1691a51094 * lisp/emacs-lisp/map.el: Make the functions generic
Make them document their delegation relationship, to clarify when
a method is needed.
(map--dispatch): Give more info in the error message.
(map-elt): Make it generic and deprecate the 'testfn' arg.
(map-put): Make it obsolete.
(map-length): Make it work on hash-tables.
(map-apply): Define it in terms of map-do.
(map-do, map-into): Use cl-generic dispatch instead of map--dispatch.
(map-empty-p): Define it in terms of map-length.
(map-contains-key): Deprecate 'testfn'.  Make it return a boolean, so
it can return non-nil even if 'key' is nil.  Improve implementation to
avoid constructing an intermediate list of all keys.
(map-merge-with): Use 'eql' rather than `eq'.
(map-put!): Rename from map--put and make it generic, to replace map-put.
(map--apply-alist, map--apply-hash-table, map--apply-array):
Turn them into methods of map-apply.
(map--do-alist, map--do-array): Turn them into methods of map-do.
(map--into-hash-table): Turn it into a method of map-into.
2018-12-11 17:54:13 -05:00
Martin Rudalics
1e34d7579c Fix typo in 'dired-restore-positions'
* lisp/dired.el (dired-restore-positions): Fix typo in last
change fixing Bug#33458.
2018-12-11 08:56:15 +01:00
Glenn Morris
7f95e1aec3 Add test/Makefile machinery to exclude test .el files
* test/Makefile.in (EXCLUDE_TESTS): New variable.
(ELFILES): Filter out any specified exclude files.
2018-12-10 20:40:16 -05:00
Nobuyoshi Nakada
3729a3f88f Support Ruby block arguments ending with , or *
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token):
Recognize punctuation before "closing-|" as a separate token.
(ruby-smie--backward-token): Same (bug#33487).

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-forward-sexp-jumps-do-end-block-with-no-args)
(ruby-backward-sexp-jumps-do-end-block-with-no-args)
(ruby-forward-sexp-jumps-do-end-block-with-empty-args)
(ruby-backward-sexp-jumps-do-end-block-with-empty-args)
(ruby-forward-sexp-jumps-do-end-block-with-args)
(ruby-backward-sexp-jumps-do-end-block-with-args)
(ruby-forward-sexp-jumps-do-end-block-with-any-args)
(ruby-forward-sexp-jumps-do-end-block-with-expanded-one-arg)
(ruby-forward-sexp-jumps-do-end-block-with-one-and-any-args)
(ruby-backward-sexp-jumps-do-end-block-with-one-and-any-args):
New tests.
2018-12-11 03:14:35 +02:00
Juri Linkov
0054961acf * lisp/isearch.el (isearch-pre-command-hook): Support `isearch-move'
command properties with values `enabled' and `disabled'
also for the value `shift' of isearch-yank-on-move.  (Bug#15839)
2018-12-11 02:36:46 +02:00
Juri Linkov
712e74a9fb * lisp/vc/vc.el (vc-root-version-diff): New command (bug#33650).
(vc-root-diff): Call it interactively on a prefix argument.
2018-12-11 01:54:20 +02:00
Matthias Meulien
0249277925 Support git commit --no-verify
* lisp/vc/vc-git.el (vc-git-log-edit-toggle-no-verify): New function.
(vc-git-log-edit-mode-map): Add binding.
(vc-git-checkin): Add an entry for that header.
2018-12-11 01:17:52 +02:00
Paul Eggert
c8431a06e4 Fix bug when hashing reversed buffer regions
* src/fns.c (extract_data_from_object): When checking
file-coding-system-alist, calculate the coding system
correctly even if START and END are out of order.
Use bool for booleans.
2018-12-10 13:41:22 -08:00
Glenn Morris
037aabba49 Merge from origin/emacs-26
2075864 (origin/emacs-26) CC Mode: stop extra parens on expression ca...
2018-12-10 09:43:05 -08:00
Glenn Morris
fd1afe2d2a ; Merge from origin/emacs-26
The following commit was skipped:

0220391 Fix cairo scrolling for side-by-side windows
2018-12-10 09:43:05 -08:00
Glenn Morris
e60fc320e3 Merge from origin/emacs-26
5a7451c CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer t...
b0ed9d1 * lisp/emacs-lisp/cursor-sensor.el: Add motivation
2018-12-10 09:43:05 -08:00
Glenn Morris
6383844952 ; Merge from origin/emacs-26
The following commit was skipped:

ee1ebe8 Guard occur against an undefined orig-line
2018-12-10 09:43:05 -08:00
Glenn Morris
3d353ce585 Merge from origin/emacs-26
908af9d Indexing followup to recent changes
505ac9a Improve documentation of cursor-sensor.el (bug#33664)
d817d2c * doc/lispref/commands.texi (Adjusting Point): Bug#33662
18442da Tramp multi-hop methods must be inline
1e3e24d ; * src/xterm.c (x_update_begin): Fix whitespace.
1d743d2 Fix scaling problem in Cairo builds
2b9e993 ; * doc/lispref/text.texi (Special Properties): Fix wording. ...
e568202 * lisp/simple.el (next-line-or-history-element): Use current-...
c7897c2 A few further fixes of window internals description

# Conflicts:
#	doc/misc/tramp.texi
2018-12-10 09:43:05 -08:00
Glenn Morris
874f69acec * admin/gitmerge.el (gitmerge-skip-regexp): Add yet another variant. 2018-12-10 12:42:17 -05:00
Michael Albinus
edd0c24116 * lisp/net/tramp-compat.el (tramp-compat-flatten-list): New defun. 2018-12-10 16:52:21 +01:00
Stefan Monnier
063d8c02c2 * lisp/Makefile.in (compile-main): Use a more selective regexp. 2018-12-10 10:06:34 -05:00
Alan Mackenzie
2075864c77 CC Mode: stop extra parens on expression causing false fontification as type
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): recognize
arithmetic operator followed by several open parentheses, not just one, as not
being an argument list.
2018-12-10 14:30:40 +00:00
Ari Roponen
0220391c00 Fix cairo scrolling for side-by-side windows
Backport: Fixes Bug#33442.

* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for
side-by-side split windows.  (Bug#31288)

(cherry picked from commit 6e362a32bc)
2018-12-10 14:21:54 +01:00
Alan Mackenzie
5a7451c383 CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer to type a"
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When testing for an
identifier after "a *", on failure additionally check for a digit, setting a
new flag variable got-number if one is found.  In the test for CASE 18, check
this flag.
2018-12-10 12:12:02 +00:00
Stefan Monnier
b0ed9d1433 * lisp/emacs-lisp/cursor-sensor.el: Add motivation 2018-12-09 20:56:35 -05:00
Paul Eggert
48d7720993 Remove CHECK_FIXNUM_CAR etc.
* src/coding.c (CHECK_FIXNAT_CAR, CHECK_FIXNAT_CDR):
* src/lisp.h (CHECK_FIXNUM_CAR, CHECK_FIXNUM_CDR):
Remove.  All uses removed.  These seem to have been based on
the assumption that the argument cons needs to be modified,
an assumption that is incorrect for fixnums.
(Fdefine_coding_system_internal): Use CHECK_RANGED_INTEGER
instead of a special diagnostic for graphic register numbers.
2018-12-09 17:11:37 -08:00
Glenn Morris
87bc518afc * test/lisp/eshell/eshell-tests.el (with-temp-eshell):
Avoid permanently changing HISTFILE.
2018-12-09 15:56:48 -08:00
Juri Linkov
f8179cd366 Fix occur for non-nil list-matching-lines-jump-to-current-line (bug#33476)
* lisp/replace.el (occur-engine): Move orig-line let-binding higher.
Don't use start-line in forward-line.
2018-12-10 01:53:08 +02:00
Raimon Grau
ee1ebe8246 Guard occur against an undefined orig-line
; Not to be merged to master
* lisp/replace.el (occur-engine): Avoid inserting the current line if
orig-line is nil.  This happens, for example, when reverting an occur
buffer with `list-matching-lines-jump-to-current-line' set to t.
(Bug#33476)
2018-12-10 01:42:41 +02:00
Michael Albinus
38f2b58271 * test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
Use proper error symbol.
2018-12-09 17:09:53 +01:00
Eli Zaretskii
908af9dfc4 Indexing followup to recent changes
* doc/lispref/text.texi (Special Properties): Index
'cursor-sensor-inhibit'.  (Bug#33664)
2018-12-09 17:14:55 +02:00
Stefan Monnier
505ac9a0b1 Improve documentation of cursor-sensor.el (bug#33664)
* doc/lispref/text.texi (Special Properties): Mention cursor-sensor-inhibit.
* lisp/emacs-lisp/cursor-sensor.el (Commentary): Add cursor-sensor-mode.
(cursor-sensor-inhibit): Add docstring.
2018-12-09 08:59:20 -05:00
Stefan Monnier
d817d2cfb9 * doc/lispref/commands.texi (Adjusting Point): Bug#33662
Tweak text to clarify intangibility.
2018-12-09 08:34:35 -05:00
Alan Mackenzie
d1c77129b0 Don't create *Compile-Log* due to byte-compile. Amend message to it.
This fixes bug #33602 and is a partial reversion of a commit from
2018-11-28T13:15:50.

* lisp/emacs-lisp/bytecomp.el (byte-compile-log-file): Don't create buffer
*Compile-Log* because it doesn't already exist.  Amend message "Compiling no
file" to be clearer (?and less irritating).
2018-12-09 12:59:03 +00:00
Michael Albinus
18442da60f Tramp multi-hop methods must be inline
* doc/misc/tramp.texi (Ad-hoc multi-hops): Involved methods must
be inline methods.
2018-12-09 09:55:29 +01:00
Paul Eggert
d79bb75683 Add make_vector and make_nil_vector
This makes the callers a bit easier to read, and doubtless
improves efficiency very slightly.  It also simplifies
possible future changes to allow bignum indexes to buffers.
* src/alloc.c (allocate_vectorlike):
Prefer ptrdiff_t to size_t when either will do.
(make_vector): New function.
(Fmake_vector): Use it.
* src/buffer.c (syms_of_buffer):
* src/bytecode.c (syms_of_bytecode):
* src/category.c (Fmake_category_table, init_category_once):
* src/ccl.c (syms_of_ccl):
* src/character.c (syms_of_character):
* src/charset.c (Fdefine_charset_internal)
(Ffind_charset_region, Ffind_charset_string):
* src/chartab.c (copy_char_table):
* src/coding.c (Fdefine_coding_system_internal, syms_of_coding):
* src/composite.c (get_composition_id, Fcomposition_get_gstring):
* src/composite.h (LGLYPH_NEW):
* src/fns.c (concat, Flocale_info, make_hash_table):
* src/font.c (font_otf_ValueRecord, font_otf_anchor)
(build_style_table, syms_of_font):
* src/fontset.c (RFONT_DEF_NEW, fontset_find_font)
(dump_fontset, syms_of_fontset):
* src/image.c (xpm_make_color_table_v):
* src/keyboard.c (modify_event_symbol, menu_bar_items)
(parse_menu_item, parse_tool_bar_item, init_tool_bar_items)
(syms_of_keyboard):
* src/keymap.c (Fdefine_key, describe_map, describe_vector):
* src/lread.c (read_vector):
* src/macfont.m (macfont_shape):
* src/menu.c (init_menu_items):
* src/nsfns.m (ns_make_monitor_attribute_list):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
* src/profiler.c (make_log):
* src/window.c (Fcurrent_window_configuration):
* src/xdisp.c (with_echo_area_buffer_unwind_data)
(format_mode_line_unwind_data):
* src/xfaces.c (Finternal_make_lisp_face)
(Fface_attributes_as_vector):
* src/xfns.c (x_make_monitor_attribute_list)
(Fx_display_monitor_attributes_list):
* src/xfont.c (syms_of_xfont):
* src/xselect.c (x_handle_dnd_message):
* src/xwidget.c (save_script_callback):
Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil).
* src/callint.c (Fcall_interactively):
* src/charset.c (load_charset_map):
* src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric):
* src/composite.c (get_composition_id)
* src/dispnew.c (Fframe_or_buffer_changed_p)
(syms_of_display):
* src/fns.c (make_hash_table, maybe_resize_hash_table):
* src/font.c (font_style_to_value):
* src/fontset.c (FONTSET_ADD, fontset_add):
* src/json.c (json_to_lisp):
* src/keymap.c (syms_of_keymap):
* src/lread.c (init_obarray):
* src/profiler.c (make_log, Fprofiler_cpu_log):
* src/term.c (term_get_fkeys_1):
Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V).
* src/font.c (build_style_table):
* src/macfont.m (macfont_shape):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
Prefer make_uninit_vector if the vector will be initialized soon.
* src/lisp.h (make_nil_vector): New function.
2018-12-09 00:23:55 -08:00
Eli Zaretskii
c2fdd50c3c Fix resolving symlinks in Eshell history file names
* lisp/eshell/em-dirs.el (eshell-write-last-dir-ring):
* lisp/eshell/em-hist.el (eshell-write-history): Don't call
file-truename with argument of nil.  (Bug#33477)

* test/lisp/eshell/eshell-tests.el (with-temp-eshell): Remove
HISTFILE from the environment, to make sure the Eshell history
file is nil.
2018-12-09 09:45:40 +02:00
Paul Eggert
7515a1d493 * src/alloc.c (VECTOR_ELTS_MAX): Make sure it’s signed. 2018-12-08 23:00:18 -08:00
Paul Eggert
fa4dd8dd01 Port VECTOR_ELTS_MAX to older GCC etc.
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-12/msg00182.html
* src/alloc.c (VECTOR_ELTS_MAX): Now a macro.
Needed for portability to older GCC and non-GCC.
2018-12-08 22:54:11 -08:00
Paul Eggert
7bcea8f8c1 Streamline and fix vector-size checks
* src/alloc.c (VECTOR_ELTS_MAX): New constant.
(allocate_vectorlike): LEN now must be positive.  Assume LEN
is in range.  All callers changed.
(allocate_vector): Arg is now ptrdiff_t, not EMACS_INT.
All callers changed.  Return zero vector here, not in
allocate_vectorlike.
* src/lisp.h (make_uninit_vector): Simplify.
* src/xwidget.c (webkit_js_to_lisp):
Check for overflow in ptrdiff_t calculations.
2018-12-08 16:58:40 -08:00
Paul Eggert
a9732737f2 Suppress WebKitGTK+ 2.21.1 diagnostics
* src/xwidget.c: Suppress deprecation warnings (Bug#33679).
2018-12-08 16:02:31 -08:00
Michael Heerdegen
287f86d360 Fix quote in the copyright skeleton
Revert replacing a backquote in the "copyright" skeleton with a quote
done in "Replace insignificant backquotes" which broke the skeleton.

* lisp/emacs-lisp/copyright.el (copyright): Restore the correct
version of the skeleton that used a backquote.
2018-12-08 22:42:08 +01:00
Paul Eggert
a65c0929eb Fix integer overflow in oversize vectors
* src/alloc.c (allocate_vector): Fix integer overflow when
allocating very large vectors, by taking large_vector_offset
into account.  Assume C99.
2018-12-08 10:50:15 -08:00
Paul Eggert
9b099ce56b * src/alloc.c (allocate_vectorlike): Simplify. 2018-12-08 10:50:15 -08:00
Eli Zaretskii
1e3e24d957 ; * src/xterm.c (x_update_begin): Fix whitespace. 2018-12-08 11:50:58 +02:00
Ari Roponen
1d743d2461 Fix scaling problem in Cairo builds
* src/xterm.c (x_begin_cr_clip) [USE_GTK]:
(x_update_begin) [USE_CAIRO && USE_GTK]: Support scaling.
(Bug#33442)
2018-12-08 11:50:00 +02:00
Eli Zaretskii
469e6bc57b Honor 'vc-bzr-log-switches' in 'vc-bzr-revision-table'
* lisp/vc/vc-bzr.el (vc-bzr-revision-table): Honor
'vc-bzr-log-switches'.
2018-12-08 11:39:35 +02:00
Steven De Herdt
51170f34ac Honor 'vc-bzr-log-switches' in 'vc-bzr-expanded-log-entry'
* lisp/vc/vc-bzr.el (vc-bzr-expanded-log-entry): Honor
'vc-bzr-log-switches'.  (Bug#33494)

Copyright-paperwork-exempt: yes
2018-12-08 11:34:09 +02:00
Eli Zaretskii
7e9f62c0bc Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2018-12-08 11:13:28 +02:00
Eli Zaretskii
2877471fef Document that Eshell follows symlinks in history file names
* etc/NEWS: Mention that Eshell now follows symlinks in
history file names.
2018-12-08 11:12:38 +02:00
Philip Hudson
ddb6efdbc5 Follow links in Eshell last-dir-ring
* lisp/eshell/em-hist.el (eshell-write-last-dir-ring):
Follow symlinks in 'eshell-last-dir-ring-file-name'.
(Bug#33477)
2018-12-08 11:07:43 +02:00
Philip Hudson
3660d66587 Follow symlink in Eshell history
* lisp/eshell/em-hist.el (eshell-write-history): Follow
symlinks in 'eshell-history-file-name'.  (Bug#33460)
2018-12-08 11:03:44 +02:00
Martin Rudalics
d2b3a37886 New buffer display action alist entry 'window-min-height' (Bug#32825)
* lisp/window.el (display-buffer-below-selected): Handle
'window-min-height' action alist entry (Bug#32825).
* doc/lispref/windows.texi (Buffer Display Action Functions)
(Buffer Display Action Alists): Add documentation for
'window-min-height' action alist entries.
* etc/NEWS: Mention 'window-min-height' action alist entry.
2018-12-08 09:37:40 +01:00
Martin Rudalics
1d676aabca Adjust windows' previous buffers when reverting dired buffers (Bug#33458)
* lisp/dired.el (dired-save-positions, dired-restore-positions):
For each window that showed the reverted buffer before, fix the
point positions in its list of previously shown buffers the way
these routines handle window point for all windows currently
showing the buffer (Bug#33458).
2018-12-08 09:18:28 +01:00
Martin Rudalics
1fc73de597 Improve how 'balance-windows' handles fixed-size windows (Bug#33254)
* lisp/window.el (balance-windows-2): When a child window has
fixed size, don't count it as resizable (Bug#33254).
Handle case where a window has no resizable child windows.
2018-12-08 09:01:23 +01:00