1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

139385 Commits

Author SHA1 Message Date
Eric Ludlam
0f7163ab89 * test/manual/cedet/tests/: New files for semantic-utest-ia.el
* test/manual/cedet/tests/test.mk,
test/manual/cedet/tests/test.srt, test/manual/cedet/tests/test.texi,
test/manual/cedet/tests/testlocalvars.cpp,
test/manual/cedet/tests/teststruct.cpp,
test/manual/cedet/tests/testtemplates.cpp,
test/manual/cedet/tests/testusing.cpp,
test/manual/cedet/tests/testusing.hh,
test/manual/cedet/tests/testvarnames.java.
test/manual/cedet/tests/testwisent.wy:
New files to be used by test/lisp/cedet/semantic-utest-ia.el.
Author: Eric Ludlam <zappo@gnu.org>
2019-10-31 19:01:08 -04:00
Alan Third
fd1b720028 Prevent text flicker with macOS input methods (bug#23412)
* src/nsterm.m ([EmacsView setMarkedText:selectedRange:]): Don't
always delete the working text as ns-put-working-text does that.
2019-10-31 20:40:56 +00:00
Mattias Engdegård
d75794fd5c Inhibit undo-in-region for mouse-drag-region (bug#37700)
'mouse-drag-region' leaves the region active around the dragged text,
so a straight undo did not revert the entire operation.  To remedy
this, inhibit undo-in-region when the last command was
mouse-drag-region.  (Method suggested by Stefan Monnier.)

* lisp/mouse.el (undo-drag-region): Set the undo-inhibit-region property.
* lisp/simple.el (undo): Inhibit undo-in-region if the last command
had the undo-inhibit-region property set.
* doc/lispref/symbols.texi (Standard Properties):
* doc/lispref/text.texi (Undo): Document undo-inhibit-region.
* etc/NEWS: Announce the property.
2019-10-31 17:41:29 +01:00
Lars Ingebrigtsen
111a95fe6d Ensure that font-local variables are buffer-local
* lisp/font-lock.el (font-lock-set-defaults): Ensure that the font
lock variables are buffer-local even when nil, so that they're
copied correctly by mhtml mode when changing sub-modes (bug#33937).
2019-10-31 14:06:08 +01:00
Lars Ingebrigtsen
60ad3d63cf Clean up font-lock-refontify slightly
* lisp/font-lock.el (font-lock-refontify): Use
syntax-ppss-flush-cache instead of internal variable.
2019-10-31 13:26:19 +01:00
Lars Ingebrigtsen
d630a047bb Further tweaks to sh-script \ #foo font locking
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
Tweak previous \ #foo change to work on all quoted characters, but
check that the backslash itself is not backslashed.  Regexp from
Stefan Monnier.
2019-10-31 13:07:37 +01:00
Michael Albinus
bdb33af39d Fix some minor Tramp problems
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Check, that `tramp-password-save-function' is a function.

* lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info):
Check, that there is a share.

* lisp/net/tramp.el (outline-regexp): Declare.
(tramp-get-debug-buffer): Let-bind `signal-hook-function'.

* test/lisp/net/tramp-tests.el (tramp-test04-substitute-in-file-name):
Skip some tests for Emacs 24 and 25; they let Emacs crash.
2019-10-31 11:13:13 +01:00
Robert Pluim
e168bb7386 Rework vc stash bindings
This adds create/snapshot bindings to the stash button even when there
are no stashes, and extends the stash menu bindings.

* etc/NEWS: Announce the bindings.

* lisp/vc/vc-git.el (vc-git-stash-shared-map): New keymap.  Holds
shared bindings between stash button and stash list.
(vc-git-stash-map): Inherit from vc-git-stash-shared-map.
(vc-git-stash-button-map): New keymap.  Holds button bindings,
inherit from vc-git-stash-shared-map.
(vc-git-stash-shared-help, vc-git-stash-list-help): New
defconsts.  Abstract out list/button help texts.
(vc-git--make-button-text): Set keymap property to
vc-git-stash-button-map.
(vc-git-make-stash-button): Use vc-git-stash-shared-help.
(vc-git-stash-menu-map): Add items for vc-git-stash and
vc-git-stash-snapshot.
(vc-git-dir-extra-headers): Use vc-git-stash-list-help and
vc-git-stash-shared-help.  Add vc-git-stash and
vc-git-stash-snapshot bindings to text shown when there are no stashes.
2019-10-31 10:53:05 +01:00
Paul Eggert
e65be8cc5b Fix bug with lock file on nonstandard filesystem
* src/filelock.c (create_lock_file):
Don’t disable user write access to the lock file (Bug#37884).
2019-10-30 18:15:53 -07:00
Lars Ingebrigtsen
48fdfd8b93 Font-lock symlinks in dired buffers better
* lisp/dired.el (dired-font-lock-keywords): Font-lock symlinks
differently based on whether they point at a directory or not
(bug#17064).  Based on code from Michael Heerdegen.
2019-10-31 00:31:32 +01:00
Juri Linkov
390dd2cff9 * lisp/tab-bar.el (tab-bar-select-tab): Use set-frame-parameter.
(tab-bar-list-noselect, tab-bar-list-mode): Rearrange buffer-read-only.
2019-10-31 01:11:05 +02:00
Paul Eggert
f2a72bb8ed Fix print.c infloop on circular lists
Fix infinite loops in print.c when a circular list is passed
to command-error-default-function or to error-message-string.
* src/print.c (print_error_message):
Use FOR_EACH_TAIL to avoid infloop on circular lists.
(print_object): Use FOR_EACH_TAIL_SAFE, as it uses
Brent’s teleporting tortoise-hare algorithm which is
asymptotically better than the classic tortoise-hare
algorithm that the code wsas using.
* test/src/print-tests.el (print-circle-2): When print-circle
is nil, do not insist on a particular cycle-detection heuristic.
(error-message-string-circular): New test.
2019-10-30 14:43:14 -07:00
Paul Eggert
581601e650 Fix keyboard.c infloops on circular lists
Fix infinite loops in keyboard.c when a circular list is
found in a hook, or in help-event-list, or in the argument
of event-convert-list, or in a keymap where a Lucid event
type list is expected, or in a menu or tab spec.
* src/keyboard.c (safe_run_hooks_error, menu_bar_items)
(parse_menu_item, parse_tab_bar_item, parse_tool_bar_item):
Use FOR_EACH_TAIL to avoid infloop on circular lists.
(help_char_p, Fevent_convert_list, lucid_event_type_list_p):
Use FOR_EACH_TAIL_SAFE to avoid infloop on circular lists,
when the action is idempotent so a circular list can be
treated as a noncircular one.
2019-10-30 14:43:14 -07:00
Paul Eggert
40ae02ff50 Fix fileio.c infloops on circular lists
Fix infinite loops in fileio.c when a circular list is the
value of after_insert_file_functions,
buffer-auto-save-file-format, buffer-file-format, or
write-region-annotate-functions.
* src/fileio.c (Finsert_file_contents, build_annotations):
Use FOR_EACH_TAIL to avoid infloop on circular lists.
(build_annotations): Use an EMACS_INT, not an int, to count
nesting level.
* test/src/fileio-tests.el:
(fileio-tests--circular-after-insert-file-functions): New test.
2019-10-30 14:43:14 -07:00
Kevin Ryde
94b8153eaa Support \pagebreak[0] for paragraph-separate in latex-mode
* textmodes/tex-mode.el (latex-mode): In 'paragraph-separate' allow
optional argument ('[0]', etc.) for '\pagebreak[0]'.  (Bug#19039)
2019-10-30 22:35:19 +01:00
Tom Tromey
772f1c4189 Send -enable-frame-filters to gdb
* lisp/progmodes/gdb-mi.el (gdb-init-1): Send -enable-frame-filters to
gdb.
2019-10-30 22:25:23 +01:00
Lars Ingebrigtsen
f9ffb81fb8 Fix previous sh-script.el font-lock #comment change
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function): We
want to match "\ " before a comment; not a space character.
2019-10-30 22:06:18 +01:00
Lars Ingebrigtsen
77d4491391 Revert "Move description of value to syntax-ppss function."
This reverts commit 305dbc7e2b.

Both of the functions in question are used a lot in the sources, so move it back to the more basic function.
2019-10-30 21:26:22 +01:00
Lars Ingebrigtsen
f7673c147c Add a new ppss structure for syntax-ppss data
* lisp/emacs-lisp/syntax.el (ppss): Add a new structure to provide
accessors to the syntax-ppss data.
2019-10-30 21:25:23 +01:00
Lars Ingebrigtsen
b21ea56edc Tweak fontification of \url{http://foo.org/bar%zot} in (la)tex-mode
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1):
\url{http://foo.org/bar%zot} shouldn't be fontified as having a
comment, so make the tex-verbatim face overwrite the
already-applied syntactical comment bits (bug#37134).
2019-10-30 21:06:47 +01:00
Lars Ingebrigtsen
4650aa3523 Bind vc-git-stash to a key
* lisp/vc/vc-git.el (vc-git-stash-map): Give `vc-git-stash' a
keystroke, because it's a useful command.

When there are no stashes, there's no way to use that keystroke (since
it's only bound on the stash lines), so perhaps that should also be
fixed somehow.
2019-10-30 20:54:44 +01:00
Lars Ingebrigtsen
f8134d2753 Clear more data in font-lock-refontify to ensure refontifying
* lisp/font-lock.el (font-lock-refontify): Clear out even more data.
2019-10-30 15:39:44 +01:00
Lars Ingebrigtsen
b996117fe5 font-lock \ #foo in shell mode more correctly
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
\ #foo isn't a comment -- it's a symbol that starts with a space
character (bug#17538).
2019-10-30 15:39:15 +01:00
Lars Ingebrigtsen
9df254119c Make font-lock-refontify try even harder to refontify
* lisp/font-lock.el (font-lock-refontify): Make this command work
even after switching global font lock mode on and then off again.
2019-10-30 15:04:17 +01:00
Lars Ingebrigtsen
1fc8bf71d9 Fix setgid fontification in dired on some OS-es
* lisp/dired.el (dired-font-lock-keywords): Apparently some
versions of ls use "S" for setgid and other use "s" (bug#8186).
2019-10-30 13:30:47 +01:00
Lars Ingebrigtsen
66efb2f3a6 Fix "dnl" highlights in m4-mode
* lisp/progmodes/m4-mode.el (m4-font-lock-keywords): "dnl"
comments should override any previous syntax-based highlighting
(37132).  This makes "dnl foo#bar" be highlighted correctly.
2019-10-30 13:16:44 +01:00
Lars Ingebrigtsen
e1409379f7 Add a convenience function to be used when working on font locking
* doc/lispref/modes.texi (Font Lock Basics): Document it.

* lisp/font-lock.el (font-lock-refontify): New convenience command.
2019-10-30 13:16:44 +01:00
Lars Ingebrigtsen
305dbc7e2b Move description of value to syntax-ppss function.
* lisp/emacs-lisp/syntax.el (syntax-ppss): Move the description of
the return value from...

* src/syntax.c (Fparse_partial_sexp): ... here because
`syntax-ppss' is what's called over the place, and jumping through
an indirection to get to the value description is inconvenient.
2019-10-30 13:16:44 +01:00
Lars Ingebrigtsen
40c787ff4e Indent font-lock-fontify-syntactically-region
* lisp/font-lock.el (font-lock-fontify-syntactically-region):
Indent function.
2019-10-30 13:16:43 +01:00
Michael Albinus
fc05708248 * lisp/net/tramp.el (outline-regexp): Remove declaration. 2019-10-30 09:44:24 +01:00
Juri Linkov
9e10ee754c * etc/NEWS: Update renamed function read-char-from-minibuffer. 2019-10-30 02:08:55 +02:00
Lars Ingebrigtsen
7ce00e9a8b Fix image-converter probes
* lisp/image/image-converter.el (image-converter--probe): Check
that the executable exists before trying to call it.
2019-10-30 01:02:48 +01:00
Juri Linkov
ba7755bfb7 Rename read-char-with-history to read-char-from-minibuffer (bug#10477)
* lisp/simple.el (read-char-from-minibuffer-history):
Rename from read-char-with-history--history.
(read-char-from-minibuffer-map):
Rename from read-char-with-history--map.
(read-char-from-minibuffer): Rename from read-char-with-history.
(read-char-from-minibuffer-self-insert): New command.
(zap-to-char): Use read-char-from-minibuffer.
2019-10-30 02:00:02 +02:00
Lars Ingebrigtsen
682eae776e Make the debbugs groups also include robot messages
* lisp/gnus/gnus-group.el (gnus-bug-group-download-format-alist):
Change the URL to also include robot messages.
2019-10-30 00:17:57 +01:00
Juri Linkov
bafcef87c3 Reimplement read-char-with-history based on read-from-minibuffer
* lisp/simple.el (read-char-with-history): Reimplement based on
read-from-minibuffer.
* lisp/simple.el (read-char-with-history--map): New variable
(bug#10477).
2019-10-30 00:01:11 +01:00
Juri Linkov
d7f62ce0cd * lisp/tab-bar.el: Store point position and frame buffer-lists in tab.
* lisp/tab-bar.el (tab-bar--tab): Store additionally point-marker,
frame parameters buffer-list and buried-buffer-list, both for wc and ws.
Use seq-filter.
(tab-bar-select-tab): Restore point-marker after restoring
window-configuration.  Also restore frame parameters buffer-list
and buried-buffer-list both for window-configuration and window-state.
(tab-bar-history-limit, tab-bar-history--minibuffer-depth): New variables.
(tab-bar-history-current): Rename from tab-bar-history--pre-change.
(tab-bar-history--pre-change): Set tab-bar-history-current.
(tab-bar--history-change): Use seq-take for tab-bar-history-limit.
(tab-bar-history-back, tab-bar-history-forward): Restore point-marker.
(tab-bar-list-noselect): Use seq-remove.

* lisp/emacs-lisp/seq.el (seq-take, seq-filter): Add autoload cookie.
2019-10-30 00:31:11 +02:00
Lars Ingebrigtsen
d3517de4b4 Make url-cookie.el be more resistant against bogus data
* lisp/url/url-cookie.el (url-cookie-handle-set-cookie): Don't bug
out on large max-age values (bug#37974).
2019-10-29 22:53:00 +01:00
Lars Ingebrigtsen
6f7e99fb18 Document run-with-timer
* doc/lispref/os.texi (Timers): Mention run-with-timer (bug#37875).
2019-10-29 22:22:25 +01:00
Lars Ingebrigtsen
19c98f7620 Default exotic image formats (like .webp) to image-mode
* doc/lispref/errors.texi (Standard Errors): Mention the new error.

* lisp/files.el (auto-mode-alist): Add a bunch of image suffixes
to the list (bug#37972) based on the output from "gm convert -list
format" (i.e., graphicsmagick).

* lisp/image-mode.el (image-mode): Rewrite to possibly notify the
user about image-use-external-converter.
(image-mode--setup-mode): Factor out into own function and don't
run under `condition-case' as there's nothing here that should
error.

* lisp/image.el (unknown-image-type): New error.
(image-type): Signal that error so that image-mode can offer
sensible feedback to the user.
2019-10-29 21:42:39 +01:00
Lars Ingebrigtsen
1997e3b80f Fix image-converter probing
* lisp/image/image-converter.el (image-converter--find-converter):
Stop probing on the first successful probe.
2019-10-29 21:42:39 +01:00
Stefan Monnier
7208c4f8c9 * lisp/minibuffer.el: Tweak and undo parts of recent changes
(completion-metadata): Always return a fresh new cons cell.
(completion--nth-completion): Don't bother calling adjust-metadata
if the result won't be used.
(completion-pcm--hilit-commonality): Revert recent change which had
removed support for `completions-first-difference` in `substring` and
`partial-completion` styles.
(completion--flex-adjust-metadata): Treat the arg as immutable.
2019-10-29 16:17:14 -04:00
Filipp Gunbin
6d2c73e8c7 Add gradle-kotlin to compilation-error-regexp-alist-alist
* lisp/progmodes/compile.el: Add gradle-kotlin to
compilation-error-regexp-alist-alist.
* etc/compilation.txt: Add samples for it.
2019-10-29 23:06:20 +03:00
Jimmy Aguilar Mena
dafc87efd0 Optimize conditional recursive merge face.
* src/xfaces.c (merge_face_vectors) : Pass ATTR_FILTER to
merge_face_ref to stop recursion merging in advance when possible.
(merge_named_face) : add more conditions to potentially reduce calls to
merge_face_vectors in more unneeded situations.
2019-10-29 14:34:00 +01:00
Jimmy Aguilar Mena
e0bcc25f64 Fix extend face in gui interfaces.
* src/xdisp.c (extend_face_to_end_of_line) : Change call to
PRODUCE_GLYPHS with append_stretch_glyph to fill until the windows
border.
2019-10-29 14:34:00 +01:00
Jimmy Aguilar Mena
8ae2a3a46b Fix inherited :extend attribute in faces.
* src/xfaces.c (merge_face_vectors) : Add extra parameter ATTR_FILTER
with the same functionality than in merge_named_face.  Update all
occurrences.
(merge_named_face): Remove condition to avoid call
`merge_face_vectors`.
2019-10-29 14:34:00 +01:00
Lars Ingebrigtsen
0956a65e6f Make shr scale images on all frames
* lisp/net/shr.el (shr-rescale-image): Rescale images even if the
window isn't on the current frame.
2019-10-29 13:56:49 +01:00
João Távora
5860fd3123 Make icomplete-exhibit actually work when navigating up directories
Sometimes, when finding files with icomplete-mode, backward-deleting
the previous word or sexp (to move up a directory) doesn't actually
refresh the file list of the new directory.  Forcing redisplay in
icomplete-exhibit misteriously fixes the problem.

* lisp/icomplete.el (icomplete-exhibit): Add call to redisplay.
2019-10-29 00:19:33 +00:00
João Távora
7373d6eae8 New commands for making icomplete behave more like ido
This tries (not particularly hard) to emulate Ido's magic C-k, C-d,
RET and DEL.  For now, the new commands have to be explicitly added to
an active map by the user, using something like this:

(let ((imap icomplete-minibuffer-map))
  (define-key imap (kbd "C-k") 'icomplete-magic-ido-kill)
  (define-key imap (kbd "C-d") 'icomplete-magic-ido-delete-char)
  (define-key imap (kbd "RET") 'icomplete-magic-ido-ret)
  (define-key imap (kbd "DEL") 'icomplete-magic-ido-backward-updir))

* lisp/icomplete.el (icomplete-magic-ido-kill)
(icomplete-magic-ido-delete-char, icomplete-magic-ido-ret)
(icomplete-magic-ido-backward-updir): New commands.
2019-10-29 00:19:33 +00:00
Juri Linkov
4e3676726a * lisp/tab-bar.el: Check for minibuffer-depth in tab-bar-history-mode.
* lisp/tab-bar.el (tab-bar-history--pre-change): Store also minibuffer-depth.
(tab-bar-history-change): Check stored minibuffer-depth for zero.
(tab-bar-history-mode): Use prefix -- for internal functions.
2019-10-28 23:55:16 +02:00
Mattias Engdegård
2aed0430c7 Use new-style rx extensions in python.el
* lisp/progmodes/python.el (python-rx): Use `rx-let' instead of
`rx-constituents'.  This allows for some slight redundancy reduction,
since `rx-let' definitions are expanded inside `not' (bug#37849).
Reorder some `or' forms for more efficient matching.
2019-10-28 17:38:33 +01:00