]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoUse lisp type in log message (bug#28176)
Alan Third [Wed, 23 Aug 2017 20:13:22 +0000 (21:13 +0100)]
Use lisp type in log message (bug#28176)

* src/nsimage.m (ns_load_image): Use make_number on index.

7 years agoFix PNGs on macOS (bug#28176)
Alan Third [Wed, 23 Aug 2017 18:53:23 +0000 (19:53 +0100)]
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.

7 years agoAdd ability to change macOS WM theme (bug#27973)
Alan Third [Sun, 20 Aug 2017 20:14:47 +0000 (21:14 +0100)]
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.

7 years agoWhen looking for the end of a declarator, prevent macros fouling up the search
Alan Mackenzie [Tue, 22 Aug 2017 17:04:34 +0000 (17:04 +0000)]
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.

7 years ago; * src/w32.c: Fix a typo in a comment.
Eli Zaretskii [Tue, 22 Aug 2017 16:52:47 +0000 (19:52 +0300)]
; * src/w32.c: Fix a typo in a comment.

7 years agoTest `file-expand-wildcards' for Tramp
Michael Albinus [Tue, 22 Aug 2017 14:22:33 +0000 (16:22 +0200)]
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.

7 years agoAdd tests for cl-macs.el (Bug#27559)
Alexander Gramiak [Fri, 11 Aug 2017 23:53:27 +0000 (17:53 -0600)]
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.

7 years agoOptimize skkdic conversion (Bug#28043)
Noam Postavsky [Sun, 2 Jul 2017 02:39:16 +0000 (22:39 -0400)]
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'.

7 years agoTreat tests in lib-src like tests in src
Reuben Thomas [Tue, 22 Aug 2017 00:39:10 +0000 (01:39 +0100)]
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.)

7 years agoPort /bin/sh scripts to Solaris 10
Paul Eggert [Mon, 21 Aug 2017 22:34:07 +0000 (15:34 -0700)]
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.

7 years agoAvoid losing the buffer restriction in flyspell-mode
Eli Zaretskii [Mon, 21 Aug 2017 17:21:28 +0000 (20:21 +0300)]
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)

7 years agoFix the 'versionclean' target in src/Makefile
Sven Joachim [Mon, 21 Aug 2017 16:28:55 +0000 (19:28 +0300)]
Fix the 'versionclean' target in src/Makefile

* src/Makefile.in (versionclean): Don't accidentally remove
emacs-module.h.  (Bug#28169)

7 years agoImplement `interrupt-process-functions'
Michael Albinus [Mon, 21 Aug 2017 15:30:33 +0000 (17:30 +0200)]
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.

7 years agoAvoid floating-point exceptions while drawing underwave
Eli Zaretskii [Mon, 21 Aug 2017 14:46:42 +0000 (17:46 +0300)]
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.

7 years agomark flymake-mode as safe local variable when the value is nil
Sam Steingold [Mon, 21 Aug 2017 13:50:09 +0000 (09:50 -0400)]
mark flymake-mode as safe local variable when the value is nil

7 years agoallow nil init in flymake-allowed-file-name-masks to disable flymake
Sam Steingold [Mon, 21 Aug 2017 13:48:14 +0000 (09:48 -0400)]
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.

7 years ago; Fix typo in lispref
Mark Oteiza [Mon, 21 Aug 2017 02:31:25 +0000 (22:31 -0400)]
; Fix typo in lispref

* doc/lispref/variables.texi (Using Lexical Binding): Append an s.

7 years agoRemove the workaround for bug#20719
Dmitry Gutov [Sun, 20 Aug 2017 21:41:59 +0000 (00:41 +0300)]
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.

7 years agoFix byte-compilation warnings in semantic/symref/grep
Dmitry Gutov [Sun, 20 Aug 2017 21:39:22 +0000 (00:39 +0300)]
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.

7 years agoSimplify eldoc-message
Dmitry Gutov [Sun, 20 Aug 2017 21:26:45 +0000 (00:26 +0300)]
Simplify eldoc-message

* lisp/emacs-lisp/eldoc.el (eldoc-message): Simplify.
Don't use ARGS because no callers pass them.  Discussed in bug#27230.

7 years agoWork around w32-python-2.x bug to fix prompt detection (Bug#21376)
Noam Postavsky [Tue, 15 Aug 2017 21:49:10 +0000 (17:49 -0400)]
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.

7 years ago; Remove python-shell-calculate-command-1 test
Noam Postavsky [Wed, 16 Aug 2017 11:06:38 +0000 (07:06 -0400)]
; 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.

7 years ago; * lisp/textmodes/ispell.el: `subr-x' is only needed at compile time.
Noam Postavsky [Sun, 20 Aug 2017 20:40:35 +0000 (16:40 -0400)]
; * lisp/textmodes/ispell.el: `subr-x' is only needed at compile time.

7 years agoAdd missing require
Reuben Thomas [Sun, 20 Aug 2017 20:32:40 +0000 (21:32 +0100)]
Add missing require

* lisp/textmodes/ispell.el: Require subr-x. (Thanks, Eli Zaretskii.)

7 years agoImplement `interrupt-process' for remote processes (Bug#28066)
Michael Albinus [Sun, 20 Aug 2017 19:18:05 +0000 (21:18 +0200)]
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.

7 years agoDocument Enchant support
Reuben Thomas [Sun, 20 Aug 2017 12:56:38 +0000 (13:56 +0100)]
Document Enchant support

* doc/emacs/fixit.texi: Mention Enchant.
* doc/misc/efaq.texi: Likewise.
* etc/NEWS: Add an item on Enchant support.

7 years agoRemove old comments and a redundant FIXME
Reuben Thomas [Tue, 8 Aug 2017 14:56:03 +0000 (15:56 +0100)]
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.

7 years agoAdd Enchant support to ispell.el (Bug#17742)
Reuben Thomas [Sun, 4 Dec 2016 22:39:27 +0000 (22:39 +0000)]
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.

7 years ago* lisp/term.el (term-mode): Use `window-text-height' (Bug#5615).
Noam Postavsky [Fri, 11 Aug 2017 00:43:13 +0000 (20:43 -0400)]
* lisp/term.el (term-mode): Use `window-text-height' (Bug#5615).

7 years agoStop printing '4' in .elc files after 'define-symbol-prop' calls
Noam Postavsky [Sat, 19 Aug 2017 11:36:05 +0000 (07:36 -0400)]
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.

7 years agoChange recent symlink tests to just test ASCII
Paul Eggert [Sun, 20 Aug 2017 00:57:00 +0000 (17:57 -0700)]
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.

7 years agoDon’t adjust CRLF in file names
Paul Eggert [Sun, 20 Aug 2017 00:15:52 +0000 (17:15 -0700)]
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.

7 years agoMake list-processes support display-line-numbers
Eli Zaretskii [Sat, 19 Aug 2017 13:36:31 +0000 (16:36 +0300)]
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)

7 years agoImprove support of display-line-numbers in package.el
Eli Zaretskii [Sat, 19 Aug 2017 11:05:51 +0000 (14:05 +0300)]
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.

7 years ago; Fix last change
Eli Zaretskii [Sat, 19 Aug 2017 10:52:02 +0000 (13:52 +0300)]
; Fix last change

* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-line-number-width): Fix last change.

7 years agoImprove support of display-line-numbers in tabulated-list-mode
Eli Zaretskii [Sat, 19 Aug 2017 10:37:31 +0000 (13:37 +0300)]
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)

7 years agoFix one more issue reported by Alex (Bug#27999)
Martin Rudalics [Sat, 19 Aug 2017 09:23:10 +0000 (11:23 +0200)]
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).

7 years agoRename `no-delete-other-window' to `no-delete-other-windows'
Martin Rudalics [Sat, 19 Aug 2017 08:58:25 +0000 (10:58 +0200)]
Rename `no-delete-other-window' to `no-delete-other-windows'

7 years agoFix two side window problems noted by Alex (Bug#27999)
Martin Rudalics [Sat, 19 Aug 2017 08:55:04 +0000 (10:55 +0200)]
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'.

7 years agoUse define-minor-mode for rcirc-omit-mode
Alex Schroeder [Sat, 19 Aug 2017 08:39:37 +0000 (10:39 +0200)]
Use define-minor-mode for rcirc-omit-mode

7 years agoClarify behavior of symlinks and directories
Paul Eggert [Sat, 19 Aug 2017 07:48:28 +0000 (00:48 -0700)]
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.

7 years agoFix recently-introduced file descriptor leak
Paul Eggert [Sat, 19 Aug 2017 06:52:19 +0000 (23:52 -0700)]
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.

7 years agoImprove make-temp-file performance on local files
Paul Eggert [Sat, 19 Aug 2017 03:36:10 +0000 (20:36 -0700)]
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.

7 years agoDon't lose arguments to eshell aliases (Bug#27954)
Noam Postavsky [Mon, 7 Aug 2017 12:56:42 +0000 (08:56 -0400)]
Don't lose arguments to eshell aliases (Bug#27954)

* lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias): Use ARGS.

7 years ago; * test/lisp/auth-source-tests.el: Require `cl-lib' instead of `cl'.
Noam Postavsky [Sat, 19 Aug 2017 02:27:08 +0000 (22:27 -0400)]
; * test/lisp/auth-source-tests.el: Require `cl-lib' instead of `cl'.

7 years ago* lisp/files.el (make-temp-file): Fix directory use case.
Ted Zlatanov [Sat, 19 Aug 2017 02:07:36 +0000 (22:07 -0400)]
* lisp/files.el (make-temp-file): Fix directory use case.

7 years agoFix and document make-temp-file optional text parameter
Ted Zlatanov [Sat, 19 Aug 2017 01:55:11 +0000 (21:55 -0400)]
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.

7 years ago* test/lisp/auth-source-tests.el: Avoid `string-join' to be simple.
Ted Zlatanov [Sat, 19 Aug 2017 01:14:17 +0000 (21:14 -0400)]
* test/lisp/auth-source-tests.el: Avoid `string-join' to be simple.

7 years ago* test/lisp/auth-source-tests.el: Minor cleanups to use CL.
Ted Zlatanov [Fri, 18 Aug 2017 22:44:58 +0000 (18:44 -0400)]
* test/lisp/auth-source-tests.el: Minor cleanups to use CL.

7 years agoFix default value of electric-pair-pairs and electric-pair-text-pairs
João Távora [Thu, 17 Aug 2017 09:44:38 +0000 (10:44 +0100)]
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.

7 years ago* lisp/elec-pair.el (electric-pair-text-pairs): Don't autoload (Bug#24901).
Noam Postavsky [Thu, 17 Aug 2017 11:06:47 +0000 (07:06 -0400)]
* 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.

7 years ago* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL
Mats Lidell [Fri, 18 Aug 2017 22:18:22 +0000 (00:18 +0200)]
* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL

7 years agoAdd auth-source tests and codify its API better
Ted Zlatanov [Fri, 18 Aug 2017 22:30:37 +0000 (18:30 -0400)]
Add auth-source tests and codify its API better

The auth-source behavior was unclear in some API use cases, so these
extra tests codify and test it. For details see
https://github.com/DamienCassou/auth-password-store/issues/29

* lisp/files.el (make-temp-file): Add new initial TEXT parameter.
* test/lisp/auth-source-tests.el (auth-source-test-searches): Add
  auth-source tests and simplify them with the new `make-temp-file'.

7 years agoDon't call the same hook twice due to obsolete aliases
Eli Zaretskii [Fri, 18 Aug 2017 09:33:08 +0000 (12:33 +0300)]
Don't call the same hook twice due to obsolete aliases

* lisp/international/robin.el (robin-activate):
* lisp/international/quail.el (quail-activate):
* lisp/international/mule-cmds.el (deactivate-input-method):
* lisp/emulation/viper-init.el (viper-deactivate-input-method):
Don't call the same hook twice, when the obsolete and the
advertised symbols are aliased.  (Bug#28118)

7 years agoA new face for show-paren in expression mode
Felipe Ochoa [Fri, 18 Aug 2017 09:05:12 +0000 (12:05 +0300)]
A new face for show-paren in expression mode

* lisp/faces.el (show-paren-match-expression): Define the new face.
* lisp/paren.el (show-paren-function): Apply the different face
when in expression mode.  (Bug#28047)

Copyright-paperwork-exempt: yes

7 years agoNon-ASCII support for man page section and header names
Eli Zaretskii [Fri, 18 Aug 2017 08:47:29 +0000 (11:47 +0300)]
Non-ASCII support for man page section and header names

* lisp/man.el (Man-name-regexp, Man-page-header-regexp)
(Man-heading-regexp): Replace ASCII character classes by
equivalent classes that allow non-ASCII characters.  Suggested by
Grégory Mounié <Gregory.Mounie@imag.fr>.  (Bug#27978)

7 years agoImplement HiDPI support for underwave on MS-Windows
Eli Zaretskii [Fri, 18 Aug 2017 08:32:10 +0000 (11:32 +0300)]
Implement HiDPI support for underwave on MS-Windows

* src/w32term.c (x_get_scale_factor): New function.
(w32_draw_underwave): Use it.
* src/xterm.c (x_draw_underwave): Offset the wave starting point
to make it identical with original code.

7 years agoSupport HiDPI displays for wave style underlines
Stephen Pegoraro [Fri, 18 Aug 2017 08:02:40 +0000 (11:02 +0300)]
Support HiDPI displays for wave style underlines

* src/xterm.c (x_draw_underwave): Compute height, length and thickness
based on scale factor.
(x_get_scale_factor): New function.

Copyright-paperwork-exempt: yes

7 years agoDelete library-of-babel.org
Bastien [Fri, 18 Aug 2017 07:39:54 +0000 (09:39 +0200)]
Delete library-of-babel.org

* etc/org/library-of-babel.org: Delete file.

7 years ago; Minor copyedits in manuals.
Eli Zaretskii [Fri, 18 Aug 2017 06:33:11 +0000 (09:33 +0300)]
; Minor copyedits in manuals.

* doc/lispref/variables.texi (Lexical Binding): The future is here.

* doc/emacs/files.texi (Copying and Naming): Use @w{..} around
constructs that could be split between lines, but shouldn't.

7 years ago* doc/emacs/files.texi (Copying and Naming): Avoid confusing texi2pdf.
Glenn Morris [Fri, 18 Aug 2017 01:49:27 +0000 (21:49 -0400)]
* doc/emacs/files.texi (Copying and Naming): Avoid confusing texi2pdf.

7 years agoRemove custom version parsing from epg-config.el (Bug#27963)
Noam Postavsky [Sun, 23 Jul 2017 03:54:34 +0000 (23:54 -0400)]
Remove custom version parsing from epg-config.el (Bug#27963)

* lisp/epg-config.el (epg-config--compare-version)
(epg-config--parse-version): Remove.
(epg-check-configuration): Use `version<=' instead.

7 years agoTreat control characters in JSON strings as invalid
Mark Oteiza [Fri, 18 Aug 2017 00:00:52 +0000 (20:00 -0400)]
Treat control characters in JSON strings as invalid

* lisp/json.el (json-peek): Reduce to following-char.
(json-pop, json-read): Zero (null char) means end of file.
(json-read-escaped-char): Delimit URL properly.
(json-read-string): Signal error for ASCII control characters.
* test/lisp/json-tests.el (test-json-peek): Check for zero instead of
:json-eof symbol.
(test-json-read-string): New test for control characters in JSON
strings.

7 years agoSupport Posix semantics of 'rename' on MS-Windows
Eli Zaretskii [Thu, 17 Aug 2017 16:48:49 +0000 (19:48 +0300)]
Support Posix semantics of 'rename' on MS-Windows

* src/w32.c (sys_rename_replace): Support Posix semantics of
'rename': return an error if OLD is a directory while NEW is not,
or vice versa.

7 years ago* src/w32.c (sys_rename_replace): Support renaming a directory.
Eli Zaretskii [Thu, 17 Aug 2017 14:58:08 +0000 (17:58 +0300)]
* src/w32.c (sys_rename_replace): Support renaming a directory.

7 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 17 Aug 2017 14:44:22 +0000 (17:44 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

7 years agoFix the MS-Windows build
Eli Zaretskii [Thu, 17 Aug 2017 14:43:19 +0000 (17:43 +0300)]
Fix the MS-Windows build

* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_open): Omit Gnulib module
'open'.

* lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]: Restore definition.

7 years agoAdd flymake-backends defcustom
João Távora [Thu, 17 Aug 2017 13:18:00 +0000 (14:18 +0100)]
Add flymake-backends defcustom

* lisp/progmodes/flymake-proc.el (flymake-proc-can-syntax-check-buffer):
Rename from flymake-can-syntax-check-file.  Suitable for adding to
flymake-backends.
(flymake-proc-start-syntax-check): Rename from
flymake-start-syntax-check.  Don't check again if buffer can be
checked.
(add-to-list flymake-backends): Hook only flymake-ui.el

* lisp/progmodes/flymake-ui.el (flymake-backends): New
defcustom.
(flymake-on-timer-event, flymake-after-change-function)
(flymake-after-save-hook, flymake-find-file-hook): Call new
flymake--start-syntax-check-buffer and
flymake--can-syntax-check-buffer.
(flymake-mode): Call flymake--can-syntax-check-buffer and set
flymake-backend.
(flymake--backend): New buffer-local variable.

7 years agoSplit flymake.el into flymake-proc.el and flymake-ui.el
João Távora [Thu, 17 Aug 2017 11:43:05 +0000 (12:43 +0100)]
Split flymake.el into flymake-proc.el and flymake-ui.el

flymake.el is now a stub that requires both files.

* lisp/progmodes/flymake-proc.el: New file.

* lisp/progmodes/flymake-ui.el: New file.

* lisp/progmodes/flymake.el: Split into flymake-ui.el and
  flymake-proc.el.  Require both files.

7 years agoSet `default-directory' for watchdog in tramp-test.el
Michael Albinus [Thu, 17 Aug 2017 09:35:41 +0000 (11:35 +0200)]
Set `default-directory' for watchdog in tramp-test.el

* test/lisp/net/tramp-tests.el (tramp-test36-asynchronous-requests):
Set `default-directory' for watchdog.

7 years ago* lisp/term/konsole.el: New file.
Andreas Schwab [Thu, 17 Aug 2017 09:13:04 +0000 (11:13 +0200)]
* lisp/term/konsole.el: New file.

7 years ago* lisp/woman.el (woman-push, woman-pop): Remove. (Bug#27962)
Noam Postavsky [Fri, 30 Jun 2017 01:51:04 +0000 (21:51 -0400)]
* lisp/woman.el (woman-push, woman-pop): Remove.  (Bug#27962)

(woman2-RS): Use plain `push' instead of `woman-push'.
(woman2-RE): Conditionally `pop' instead of `woman-pop'.

7 years agoMerge from Gnulib; use ‘open’ for O_CLOEXEC
Paul Eggert [Wed, 16 Aug 2017 20:55:46 +0000 (13:55 -0700)]
Merge from Gnulib; use ‘open’ for O_CLOEXEC

This incorporates:
2017-08-15 renameat: ensure declaration in <stdio.h> on NetBSD
2017-08-15 extensions: enable NetBSD specific extensions
2017-08-14 open: support O_CLOEXEC
2017-08-13 reallocarray: new module
* admin/merge-gnulib (AVOIDED_MODULES): Remove ‘open’, since
it now supports O_CLOEXEC and this simplifies Emacs.
* build-aux/config.guess, lib/fcntl.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, m4/extensions.m4, m4/stdlib_h.m4:
Copy from Gnulib.
* lib/cloexec.c, lib/cloexec.h, lib/open.c:
* m4/mode_t.m4, m4/open-cloexec.m4, m4/open.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib-src/etags.c (O_CLOEXEC) [WINDOWSNT]:
Remove, as Gnulib does this for us.
* src/filelock.c (create_lock_file):
* src/sysdep.c (emacs_open, emacs_pipe):
Don’t worry about O_CLOEXEC == 0, as Gnulib no longer sets it to 0.

7 years agoAllow use of run-time OS version checks on macOS (bug#27810)
Alan Third [Thu, 6 Jul 2017 22:10:49 +0000 (23:10 +0100)]
Allow use of run-time OS version checks on macOS (bug#27810)

* src/nsterm.h (NSWindowTabbingMode): Define in pre-Sierra macOS.
(MAC_OS_X_VERSION_10_6, MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8,
MAC_OS_X_VERSION_10_9, MAC_OS_X_VERSION_10_12, HAVE_NATIVE_FS): Remove
defines.
(NSWindowStyleMaskFullScreen,
NSWindowCollectionBehaviorFullScreenPrimary,
NSApplicationPresentationFullScreen,
NSApplicationPresentationAutoHideToolbar): Define in macOS 10.6.
* src/nsterm.m (colorForEmacsRed, colorUsingDefaultColorSpace,
check_native_fs, ns_read_socket, ns_select, runAlertPanel,
initFrameFromEmacs, windowDidMiniaturize, windowDidEnterFullScreen,
windowDidExitFullScreen, isFullscreen, updateCollectionBehavior,
toggleFullScreen, constrainFrameRect, scrollerWidth, syms_of_nsterm):
Allow use of run-time checks and replace version check macros.
* src/nsfns.m (ns_screen_name): Use run-time OS version checks.
* src/macfont.m (macfont_draw): Use run-time OS version checks.
* src/nsmenu.m (menuWillOpen): Use run-time OS version checks.

Co-authored-by: Charles A. Roelli <charles@aurox.ch>
7 years agoAdd multiframe image support to NS port (bug#21714)
Alan Third [Sun, 13 Aug 2017 00:47:05 +0000 (01:47 +0100)]
Add multiframe image support to NS port (bug#21714)

* src/nsimage.m (ns_load_image): Handle multiple frames.
(EmacsImage::getMetadata, EmacsImage::setFrame): New functions.
* src/nsterm.h (EmacsImage::getMetadata, EmacsImage::setFrame): New
function prototypes.

7 years agofiles-tests.el: Remove unused lexical variable
Tino Calancha [Wed, 16 Aug 2017 11:14:48 +0000 (20:14 +0900)]
files-tests.el: Remove unused lexical variable

* test/lisp/files-tests.el (file-test--do-local-variables-test);
Remove unused var 'files-test-queried'.

7 years ago* doc/emacs/files.texi (Copying and Naming): Mention
Michael Albinus [Wed, 16 Aug 2017 10:11:37 +0000 (12:11 +0200)]
* doc/emacs/files.texi (Copying and Naming): Mention

restrictions to add-name-to-file and make-symbolic-link on
remote systems.

7 years ago* lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Further support ftp-ssl.
Michael Albinus [Wed, 16 Aug 2017 09:52:12 +0000 (11:52 +0200)]
* lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Further support ftp-ssl.

7 years agoAdd tests for previous commit
Noam Postavsky [Thu, 20 Jul 2017 02:06:02 +0000 (22:06 -0400)]
Add tests for previous commit

* test/lisp/progmodes/elisp-mode-tests.el
(elisp-mode-tests--face-propertized-string): New function.
(elisp--highlight-function-argument-indexed)
(elisp--highlight-function-argument-keyed-1)
(elisp--highlight-function-argument-keyed-2): New tests.

7 years agoFix eldoc highlighting for &key args (Bug#27272)
Thierry Volpiatto [Thu, 15 Jun 2017 03:26:05 +0000 (05:26 +0200)]
Fix eldoc highlighting for &key args (Bug#27272)

* lisp/progmodes/elisp-mode.el (elisp--highlight-function-argument):
Only switch to keyword-based searching if INDEX point beyond `&key' in
the argument list.  All arguments prior to the `&key' are position
based.  Additionally, be more strict about what is a keyword when
searching for the current keyword.

7 years agoDo not assume regular Git .git/hooks dir
Paul Eggert [Tue, 15 Aug 2017 20:31:03 +0000 (13:31 -0700)]
Do not assume regular Git .git/hooks dir

Apparently Gitlab doesn’t create .git/hooks, like regular Git does.
Problem reported by Ted Zlatanov in:
http://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00380.html
* autogen.sh (git_sample_hook_src): New function.  Use it to work
even if .git/hooks or its samples do not exist.

7 years agoNew manual section "Copying and Naming"
Paul Eggert [Tue, 15 Aug 2017 17:06:44 +0000 (10:06 -0700)]
New manual section "Copying and Naming"

* doc/emacs/files.texi (Copying and Naming):
New section, split off from Misc File Ops and containing the
operations that copy, name or rename files.  This fixes some
confusion caused by the incorrect phrase "The same rule applies
to all the remaining commands in this section" in the old manual.
This change does not affect the confusion about directories (see
Bug#27986 for ongoing discussion).

7 years agoFix the MS-Windows build
Eli Zaretskii [Tue, 15 Aug 2017 16:17:41 +0000 (19:17 +0300)]
Fix the MS-Windows build

* src/fileio.c (Frename_file): Don't use ENOTSUP if it is equal to
ENOSYS.  (Bug#28097)  (Bug#27986)

7 years ago* .gitlab-ci.yml: run "autogen.sh autoconf" to avoid Git.
Ted Zlatanov [Tue, 15 Aug 2017 14:07:42 +0000 (10:07 -0400)]
* .gitlab-ci.yml: run "autogen.sh autoconf" to avoid Git.

7 years ago* .gitlab-ci.yml: add Git to the installed packages.
Ted Zlatanov [Tue, 15 Aug 2017 13:59:45 +0000 (09:59 -0400)]
* .gitlab-ci.yml: add Git to the installed packages.

7 years agoSupport indentation of detached Less CSS rulesets
Simen Heggestøyl [Tue, 15 Aug 2017 10:39:42 +0000 (12:39 +0200)]
Support indentation of detached Less CSS rulesets

* lisp/textmodes/css-mode.el (css-smie-rules): Provide better support
for indentation of detached rulesets passed to Less mixins.

* test/manual/indent/less-css-mode.less: New file.

7 years agoFixes and tweaks for the new Less CSS mode
Simen Heggestøyl [Tue, 1 Aug 2017 18:23:21 +0000 (20:23 +0200)]
Fixes and tweaks for the new Less CSS mode

* etc/NEWS: Add an entry for the new mode.

* lisp/textmodes/less-css-mode.el (less-css): Tweak docstring.
(less-css-lessc-command): Tweak docstring. Don't mark it as
safe. Don't autoload.
(less-css-compile-at-save, less-css-lessc-options)
(less-css-output-directory): Tweak docstrings. Don't autoload.
(less-css-output-file-name): Tweak docstring. Don't mark it as safe.
(less-css-input-file-name): Tweak docstring. Don't autoload.
(less-css-compile-maybe): Use `when' for one-armed `if'.
(less-css--output-path): Tweak docstring.
(less-css--maybe-shell-quote-command): Remove function.
(less-css-compile): Don't autoload. Tweak docstring and message. Fix
compiler warning. Use `string-join' instead of `mapconcat'.
(less-css-font-lock-keywords): Use `font-lock-variable-name-face' for
variables.
(less-css-mode-syntax-table, less-css-mode-map): New variables.
(less-css-mode): Change status line mode name from "LESS" to
"Less". Tweak docstring. Move syntax table definitions to
`less-css-mode-syntax-table'.
(less-css-indent-line): Remove function.

7 years agoNew major mode: Less CSS mode
Steve Purcell [Tue, 1 Aug 2017 18:15:45 +0000 (20:15 +0200)]
New major mode: Less CSS mode

* lisp/textmodes/less-css-mode.el: New file.

7 years agoarchive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits
Tino Calancha [Tue, 15 Aug 2017 06:43:16 +0000 (15:43 +0900)]
archive-int-to-mode: Fix order of testing S_ISUID, S_ISGID bits

* lisp/arc-mode.el (archive-int-to-mode):
Swap order of 2048 and 1024 tests (Bug#28092).
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode):
Update test.

7 years agoImprove rename-file port to macOS
Paul Eggert [Tue, 15 Aug 2017 01:16:04 +0000 (18:16 -0700)]
Improve rename-file port to macOS

* src/fileio.c (Frename_file): On macOS, renameat_noreplace can
fail with errno == ENOTSUP on file systems where it is not
supported, according to the Apple documentation.

7 years agoSpeed up ./configure with more caching (Bug#27960)
Noam Postavsky [Sun, 9 Apr 2017 00:58:20 +0000 (20:58 -0400)]
Speed up ./configure with more caching (Bug#27960)

* configure.ac: Cache the 'GTK compiles', 'GSettings is in gio',
'LN_S', '-znocombreloc', 'sysinfo', 'gcc autodepends', '-b link',
'Xkb', 'Xpm preprocessor', 'tputs library' 'GLib', 'signals via
characters', and 'Windows API header' checks.  Remove pause after
warning about GTK bug.

7 years agoImprove rename-file behavior on macOS
Paul Eggert [Mon, 14 Aug 2017 22:25:13 +0000 (15:25 -0700)]
Improve rename-file behavior on macOS

Problem reported by Philipp Stephani (Bug#27986).
* src/fileio.c (Frename_file):
Worry about file name case sensitivity only if CYGWIN or DOS_NT.
* src/sysdep.c (renameat_noreplace): Use renameatx_np on macOS,
since this provides the necessary atomicity guarantees.

7 years agoClean up temp files after some tests
Glenn Morris [Mon, 14 Aug 2017 21:23:18 +0000 (17:23 -0400)]
Clean up temp files after some tests

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--with-temp-file): Also delete .elc file if present.
* test/lisp/progmodes/etags-tests.el
(etags-buffer-local-tags-table-list): Delete temp file at end.

7 years agoImplement renameat_noreplace for MS-Windows
Eli Zaretskii [Mon, 14 Aug 2017 16:31:12 +0000 (19:31 +0300)]
Implement renameat_noreplace for MS-Windows

* src/sysdep.c (renameat_noreplace) [WINDOWSNT]: Implement minimal
emulation for MS-Windows.  (Bug#27986)

7 years agoFix 'rename' on MS-Windows
Eli Zaretskii [Mon, 14 Aug 2017 16:17:22 +0000 (19:17 +0300)]
Fix 'rename' on MS-Windows

* src/w32.c (sys_rename_replace): Use the FORCE argument only if
the primitive rename errors out with EEXIST.

7 years ago* lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Support ftp-ssl.
Michael Albinus [Mon, 14 Aug 2017 16:05:58 +0000 (18:05 +0200)]
* lisp/net/ange-ftp.el (ange-ftp-skip-msgs): Support ftp-ssl.

7 years agoTiny JSON performance improvement
Mark Oteiza [Mon, 14 Aug 2017 05:54:11 +0000 (01:54 -0400)]
Tiny JSON performance improvement

Get rid of some needless uses of apply.  Measuring with
  (benchmark-run 10 (json-read-file "test.json"))
showed 1.5-2.5% reduction of execution time.
* lisp/json.el (json-peek): Nix let-binding.
(json-read-string): Use concat for making a string from chars.
(json-read-array): Use cond and more appropriate conversion instead
of blindly applying.

7 years agoBe consistent in spelling 'ok-if-already-exists'.
Paul Eggert [Sun, 13 Aug 2017 18:54:46 +0000 (11:54 -0700)]
Be consistent in spelling 'ok-if-already-exists'.

7 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sun, 13 Aug 2017 15:58:24 +0000 (18:58 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

7 years agoUse 'header-line-highlight' face in proced and erc
Alexander Gramiak [Sun, 13 Aug 2017 14:56:31 +0000 (17:56 +0300)]
Use 'header-line-highlight' face in proced and erc

* lisp/erc/erc-list.el (erc-list-button):
* lisp/proced.el (proced-format): Use the 'header-line-highlight
face.  (Bug#28033)