1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00
Commit Graph

130232 Commits

Author SHA1 Message Date
Alan Third
95130f192b Fix PNGs on macOS (bug#28176)
* src/nsimage.m (ns_load_image): Remove index check.
(EmacsImage::getAnimatedBitmapImageRep): New function.
(EmacsImage::getMetadata): Use getAnimatedBitmapImageRep.
(EmacsImage::setFrame): Use getAnimatedBitmapImageRep and check index
is valid.
2017-08-23 19:57:00 +01:00
Alan Third
7baa50eca2 Add ability to change macOS WM theme (bug#27973)
* src/frame.c (make_frame, frame_parms, syms_of_frame)
[NS_IMPL_COCOA]: Add ns-appearance and ns-transparent-titlebar
options.
* src/frame.h (ns_appearance_type) [NS_IMPL_COCOA]: Add enum to
represent NSAppearance options.
(struct frame) [NS_IMPL_COCOA]: Add ns_appearance and
ns_transparent_titlebar frame parameters.
* src/nsfns.m (ns_frame_parm_handlers) [NS_IMPL_COCOA]: Add
ns_set_appearance and ns_set_transparent_titlebar handlers.
(Sx_create_frame): Handle ns-appearance and ns-transparent-titlebar
frame parameters.
(Qdark): Add new symbol for use with ns-appearance.
* src/nsterm.h (ns_set_appearance, ns_set_transparent_titlebar)
[NS_IMPL_COCOA]: Add prototypes.
* src/nsterm.m (ns_set_appearance, ns_set_transparent_titlebar)
[NS_IMPL_COCOA]: New functions.
(initFrameFromEmacs) [NS_IMPL_COCOA]: Handle ns-appearance and
ns-transparent-titlebar frame parameters.
* doc/lispref/frames.texi (Window Management Parameters): Document
ns-apperance and ns-transparent-titlebar.
2017-08-23 19:57:00 +01:00
Alan Mackenzie
4309d1574a When looking for the end of a declarator, prevent macros fouling up the search
The practical implication of this bug was a random jit-lock chunk remaining
entirely unfontified.

* lisp/progmodes/cc-mode (c-fl-decl-end): If point starts inside a macro,
restrict two forward searches to the end of that macro.
2017-08-22 17:04:34 +00:00
Eli Zaretskii
ee5a146e33 ; * src/w32.c: Fix a typo in a comment. 2017-08-22 19:52:47 +03:00
Michael Albinus
336707efb3 Test `file-expand-wildcards' for Tramp
* lisp/net/tramp-compat.el (tramp-advice-file-expand-wildcards):
Remove, not needed anymore.

* test/lisp/net/tramp-tests.el (top): Require seq.el.
(tramp-test16-directory-files): Simplify.
(tramp-test16-file-expand-wildcards): New test.
(tramp-test28-interrupt-process): Skip for older Emacsen.
2017-08-22 16:22:33 +02:00
Alexander Gramiak
ee9392a699 Add tests for cl-macs.el (Bug#27559)
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-loop): Remove
duplicate.
(cl-loop-destructuring-with): Move to cl-macs-tests.el.
* test/lisp/emacs-lisp/cl-macs-tests.el: New file.
2017-08-21 20:52:25 -04:00
Noam Postavsky
9d7973530f Optimize skkdic conversion (Bug#28043)
The primary speedup comes from the optimizing lookup-nested-alist and
set-nested-alist for the case where the key is a string.  This brings
the time down to less than half the original.

* lisp/international/mule-util.el (lookup-nested-alist)
(set-nested-alist): Use `assq' instead of `assoc' when KEYSEQ is a
string.

* lisp/international/ja-dic-cnv.el (skkdic-collect-okuri-nasi)
(skkdic-convert-okuri-nasi): Use progress-reporter functions instead
of calculating ratio of work done inline.

(skkdic-reduced-candidates): Call `char-category-set' on the first
character of the string directly, instead of using a regexp for the
character category.
(skkdic--japanese-category-set): New constant.
(skkdic-collect-okuri-nasi): Just set
`skkdic-okuri-nasi-entries-count' at once at the end rather than
updating it throughout the loop.

(skkdic-convert-postfix skkdic-convert-prefix)
skkdic-get-candidate-list, skkdic-collect-okuri-nasi)
(skkdic-extract-conversion-data): Use `match-string-no-properties'
instead of `match-string'.
2017-08-21 20:52:25 -04:00
Reuben Thomas
ba0bb332dd Treat tests in lib-src like tests in src
* test/Makefile.in (test_template): Depend on a .c source file for a
test under lib-src, as for src.  (Thanks, Glenn Morris for pointing me
in the right direction.)
2017-08-22 01:41:45 +01:00
Paul Eggert
891bc9822b Port /bin/sh scripts to Solaris 10
Its /bin/sh builtin ‘test’ command does not support -e.
* autogen.sh, build-aux/git-hooks/pre-commit:
* build-aux/gitlog-to-emacslog, make-dist:
Use test -r, not test -e.
2017-08-21 15:34:50 -07:00
Eli Zaretskii
80fccd4290 Avoid losing the buffer restriction in flyspell-mode
* src/intervals.c (get_local_map): Don't allow C-g to quit as long
as we have the buffer widened, to make sure the restriction is
preserved.  (Bug#28161)
2017-08-21 20:21:28 +03:00
Sven Joachim
694e2d8f23 Fix the 'versionclean' target in src/Makefile
* src/Makefile.in (versionclean): Don't accidentally remove
emacs-module.h.  (Bug#28169)
2017-08-21 19:28:55 +03:00
Michael Albinus
01844e40dc Implement `interrupt-process-functions'
* lisp/net/tramp.el (tramp-interrupt-process): Rename from
`tramp-advice-interrupt-process'.  Adapt according to changed API.
(top): Add it to `interrupt-process-functions'.

* src/process.c (Finternal_default_interrupt_process): New defun.
(Finterrupt_process): Change implementation, based on
Vinterrupt_process_functions.
(Vinterrupt_process_functions): New defvar.

* test/lisp/net/tramp-tests.el (tramp-test40-unload): Do not
test removal of advice.
2017-08-21 17:30:33 +02:00
Eli Zaretskii
76fbe2f454 Avoid floating-point exceptions while drawing underwave
* src/w32term.c (x_get_scale_factor):
* src/xterm.c (x_get_scale_factor): Don't let the scale factors
become less than 1.  Reported by Yuri D'Elia <wavexx@thregr.org> in
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00459.html.
2017-08-21 17:46:42 +03:00
Sam Steingold
9840499564 mark flymake-mode as safe local variable when the value is nil 2017-08-21 09:50:09 -04:00
Sam Steingold
de3a3ed034 allow nil init in flymake-allowed-file-name-masks to disable flymake
(flymake-allowed-file-name-masks): Update doc and :type.
(flymake-get-file-name-mode-and-masks): Handle nil init.
2017-08-21 09:48:14 -04:00
Mark Oteiza
807b67faa4 ; Fix typo in lispref
* doc/lispref/variables.texi (Using Lexical Binding): Append an s.
2017-08-20 22:31:25 -04:00
Dmitry Gutov
082c72d257 Remove the workaround for bug#20719
* lisp/cedet/semantic/symref/grep.el
(semantic-symref-grep-use-template): Remove the workaround for
bug#20719, it's been fixed for a while now.
2017-08-21 00:42:41 +03:00
Dmitry Gutov
9da8d600b8 Fix byte-compilation warnings in semantic/symref/grep
* lisp/cedet/semantic/symref/grep.el (greppattern): Remove.
(grepflags): Rename to semantic-symref-grep-flags.
(semantic-symref-grep-expand-keywords): Update accordingly.
(semantic-symref-grep-use-template): Remove the last two
arguments to make sure they don't shadow the (not renamed)
global variables.
(semantic-symref-perform-search)
(semantic-symref-parse-tool-output-one-line): Use slot names
instead of keywords, like the byte-compiler wants us to.
2017-08-21 00:42:41 +03:00
Dmitry Gutov
7ef0b5f611 Simplify eldoc-message
* lisp/emacs-lisp/eldoc.el (eldoc-message): Simplify.
Don't use ARGS because no callers pass them.  Discussed in bug#27230.
2017-08-21 00:42:41 +03:00
Noam Postavsky
9714545675 Work around w32-python-2.x bug to fix prompt detection (Bug#21376)
* lisp/progmodes/python.el (python-shell-prompt-detect): Don't put
carriage returns into the temporary file when running in unbuffered
mode, the w32 build of python 2.7 chokes on them.
2017-08-20 16:43:37 -04:00
Noam Postavsky
cdfe1cbca7 ; Remove python-shell-calculate-command-1 test
* test/lisp/progmodes/python-tests.el
(python-shell-calculate-pythonpath-1): Remove, it merely reprises the
body of `python-shell-calculate-command' and it has been broken on w32
since the fix for Bug#25025 was applied.
2017-08-20 16:42:15 -04:00
Noam Postavsky
bc157406a6 ; * lisp/textmodes/ispell.el: `subr-x' is only needed at compile time. 2017-08-20 16:40:35 -04:00
Reuben Thomas
a5ff1fc069 Add missing require
* lisp/textmodes/ispell.el: Require subr-x. (Thanks, Eli Zaretskii.)
2017-08-20 21:35:56 +01:00
Michael Albinus
296472f5c5 Implement `interrupt-process' for remote processes (Bug#28066)
* lisp/net/tramp-sh.el (tramp-sh-handle-start-file-process):
Support sending signals remotely.
(tramp-open-connection-setup-interactive-shell):
Trace "remote-tty" connection property.

* lisp/net/tramp.el (tramp-advice-interrupt-process): New defun.
(top): Add advice to `interrupt-process'.  (Bug#28066)

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
New test.
(tramp-test29-shell-command)
(tramp-test30-environment-variables)
(tramp-test30-environment-variables-and-port-numbers)
(tramp-test31-explicit-shell-file-name)
(tramp-test32-vc-registered)
(tramp-test33-make-auto-save-file-name)
(tramp-test34-make-nearby-temp-file)
(tramp-test35-special-characters)
(tramp-test35-special-characters-with-stat)
(tramp-test35-special-characters-with-perl)
(tramp-test35-special-characters-with-ls, tramp-test36-utf8)
(tramp-test36-utf8-with-stat, tramp-test36-utf8-with-perl)
(tramp-test36-utf8-with-ls)
(tramp-test37-asynchronous-requests)
(tramp-test38-recursive-load, tramp-test39-remote-load-path)
(tramp-test40-unload): Rename.
(tramp-test40-unload): Test also removal of advice.
2017-08-20 21:18:05 +02:00
Reuben Thomas
cf74c27ba1 Document Enchant support
* doc/emacs/fixit.texi: Mention Enchant.
* doc/misc/efaq.texi: Likewise.
* etc/NEWS: Add an item on Enchant support.
2017-08-20 13:58:09 +01:00
Reuben Thomas
fc2ccb2ae8 Remove old comments and a redundant FIXME
* lisp/textmodes/ispell.el (ispell-process-line): Remove some old
commented code, a redundant FIXME, and outdated usage instructions.
2017-08-20 11:55:40 +01:00
Reuben Thomas
60d417545a Add Enchant support to ispell.el (Bug#17742)
* lisp/textmodes/ispell.el (ispell-program-name): Add “enchant”.
(ispell-really-enchant): Add variable.
(ispell-check-version): If using Enchant, check it’s new enough (at
least 1.6.1).  (Like the ispell check, this is absolute: cannot work
without.)
(ispell-enchant-dictionary-alist): Add variable.
(ispell-find-enchant-dictionaries): Add function, based on
ispell-find-aspell-dictionaries.
(ispell-set-spellchecker-params): Allow dictionary auto-detection for
Enchant, and call ispell-find-enchant-dictionaries to find them.  Use
old ispell name to locale mapping code for Enchant too.
(ispell-send-replacement): Make it work with Enchant.
2017-08-20 11:55:40 +01:00
Noam Postavsky
dbd3a17cb0 * lisp/term.el (term-mode): Use `window-text-height' (Bug#5615). 2017-08-19 23:29:28 -04:00
Noam Postavsky
2326a3ab13 Stop printing '4' in .elc files after 'define-symbol-prop' calls
* lisp/emacs-lisp/bytecomp.el (byte-compile-define-symbol-prop):
Return nil in case we have compiled the form, to prevent a redundant
constant from getting added to the compiled output.
2017-08-19 23:29:28 -04:00
Paul Eggert
1b8d0fe44a Change recent symlink tests to just test ASCII
* test/src/fileio-tests.el (fileio-tests--symlink-failure):
Be less ambitious about testing non-ASCII chars and encoding
errors, as there are too many portability issues.
2017-08-19 17:57:45 -07:00
Paul Eggert
83f0d60e49 Don’t adjust CRLF in file names
* doc/misc/gnus.texi (Non-ASCII Group Names):
* etc/NEWS:
* test/lisp/net/tramp-tests.el (tramp--test-utf8):
Use utf-8-unix, not utf-8, for default-file-name-coding-system, so
that CRLF in file names is left alone.
* lisp/international/mule-cmds.el (set-default-coding-systems):
Do not alter CRLF in file name coding systems.
(prefer-coding-system): Ignore differences in CRLF processing when
checking whether we used the user-specified file name coding system.
* test/src/fileio-tests.el: New file.
2017-08-19 17:17:09 -07:00
Eli Zaretskii
1c382c096b Make list-processes support display-line-numbers
* lisp/simple.el (process-menu-mode): Move the call to
tabulated-list-init-header from here...
(list-processes--refresh): ...to here.  (Bug#27895)
2017-08-19 16:36:31 +03:00
Eli Zaretskii
2c77213738 Improve support of display-line-numbers in package.el
* lisp/emacs-lisp/package.el (package-menu--refresh): Redisplay
the header.  (Bug#27895)
* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-line-number-width): Fix the case when
display-line-numbers is nil.
2017-08-19 14:05:51 +03:00
Eli Zaretskii
5070717802 ; Fix last change
* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-line-number-width): Fix last change.
2017-08-19 13:52:02 +03:00
Eli Zaretskii
1e2fbb5e63 Improve support of display-line-numbers in tabulated-list-mode
* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-line-number-width): New function.
(tabulated-list-init-header, tabulated-list-print-entry): Use it.
(Bug#27895)
2017-08-19 13:37:31 +03:00
Martin Rudalics
3baf2d840f Fix one more issue reported by Alex (Bug#27999)
* doc/lispref/windows.texi (Preserving Window Sizes)
(Window Parameters): Use the term `window-preserved-size'
instead of `preserved-size' (Bug#27999).
2017-08-19 11:23:10 +02:00
Martin Rudalics
f0d5dcc41b Rename no-delete-other-window' to no-delete-other-windows' 2017-08-19 10:58:25 +02:00
Martin Rudalics
8a9905e2f7 Fix two side window problems noted by Alex (Bug#27999)
* lisp/window.el (display-buffer-in-side-window): Fix doc-string
typo.
(delete-other-windows): Rename the `no-delete-other-window'
parameter to `no-delete-other-windows' (see the discussion in
Bug#27999 for the rationale of this change).
* doc/lispref/windows.texi (Deleting Windows)
(Frame Layouts with Side Windows, Window Parameters): Rename
`no-delete-other-window' to `no-delete-other-windows'.
2017-08-19 10:55:04 +02:00
Alex Schroeder
82b05985ba Use define-minor-mode for rcirc-omit-mode 2017-08-19 10:39:37 +02:00
Paul Eggert
e58b3ef78b Clarify behavior of symlinks and directories
* doc/lispref/files.texi (Saving Buffers): Document how functions
like rename-file work with symlinks and directories.  This patch
attempts to document the current behavior better, in preparation
for possibly changing it.  See Bug#27986.
2017-08-19 00:49:39 -07:00
Paul Eggert
6763399ef3 Fix recently-introduced file descriptor leak
* src/fileio.c (Fmake_temp_file_internal):
Don’t leak a file descriptor if write_region signals an error.
2017-08-18 23:52:52 -07:00
Paul Eggert
e73691e1a4 Improve make-temp-file performance on local files
* lisp/files.el (make-temp-file): Let make-temp-file-internal do
the work of inserting the text.
* src/fileio.c (Fmake_temp_file_internal): New arg TEXT.
All callers changed.
2017-08-18 20:37:31 -07:00
Noam Postavsky
e66e81679c Don't lose arguments to eshell aliases (Bug#27954)
* lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias): Use ARGS.
2017-08-18 22:29:36 -04:00
Noam Postavsky
8ed6446300 ; * test/lisp/auth-source-tests.el: Require cl-lib' instead of cl'. 2017-08-18 22:29:32 -04:00
Ted Zlatanov
fe87e35612
* lisp/files.el (make-temp-file): Fix directory use case. 2017-08-18 22:07:40 -04:00
Ted Zlatanov
94f3f13d6d
Fix and document make-temp-file optional text parameter
* lisp/files.el (make-temp-file): Fix initial TEXT parameter.
(files--make-magic-temp-file): Support optional TEXT parameter.
* etc/NEWS: Document it.
* doc/lispref/files.texi: Document it.
* test/lisp/auth-source-tests.el: Minor reformat.
2017-08-18 21:59:39 -04:00
Ted Zlatanov
10cde01c5e
* test/lisp/auth-source-tests.el: Avoid `string-join' to be simple. 2017-08-18 21:14:17 -04:00
Ted Zlatanov
9ff5edc713
* test/lisp/auth-source-tests.el: Minor cleanups to use CL. 2017-08-18 18:46:19 -04:00
João Távora
7098823b42 Fix default value of electric-pair-pairs and electric-pair-text-pairs
Fixes: debbugs:24901

A previous change, titled "Add support for curly quotation marks to
electric-pair-mode", attempted to add these characters to the default
value of these variables.  But it did so in a quoted list, preventing
evaluation of the relevant expressions and resulting in an invalid
format.

* lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs):
Use backquote and comma.
2017-08-18 23:43:48 +01:00
Noam Postavsky
39e6692efe * lisp/elec-pair.el (electric-pair-text-pairs): Don't autoload (Bug#24901).
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Require `elec-pair'
explicitly in the interactive case.
2017-08-18 23:42:12 +01:00