1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
Commit Graph

130259 Commits

Author SHA1 Message Date
Paul Eggert
0becd64d63 Improve doc for file-name-absolute-p. 2017-08-26 13:45:25 -07:00
Michael Albinus
cc7530cae0 Fix Tramp part of Bug#28156
* lisp/files.el (file-name-non-special): Use `file-name-quote'
instead prefixing "/:", the file could already be quoted.

* lisp/net/tramp.el (tramp-error): Handle null arguments.
(tramp-handle-make-symbolic-link):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-add-name-to-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-add-name-to-file)
(tramp-smb-handle-make-symbolic-link): Adapt implementation to
stronger semantics in Emacs.  (Bug#28156)

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Extend test.
2017-08-26 15:09:55 +02:00
Eli Zaretskii
dcc3ef3ee7 Fix bugs merged with bug#25428
* lisp/simple.el (auto-fill-mode, visual-line-mode): Doc fix.
(Bug#13926)  (Bug#25434)  (Bug#25435)
2017-08-26 12:52:07 +03:00
Eli Zaretskii
5bb61463a2 Improve documentation of Info virtual files and nodes
* lisp/info.el (Info-virtual-files, Info-virtual-nodes): Doc fix.
(Bug#28237)
2017-08-26 12:40:02 +03:00
Eli Zaretskii
fca62645b6 * lisp/delsel.el (delete-selection-mode): Doc fix. (Bug#25428) 2017-08-26 12:01:24 +03:00
Grégory Mounié
21a9e5253e Support multi-lingual detection of SEE ALSO man sections
* lisp/man.el (Man-see-also-regexp): Add support for SEE ALSO
section detection in several langages: French, German, Spanish,
Portugese, Italian, Polish, Turkish, Japanese, Chinese.  (Bug#28142)

Copyright-paperwork-exempt: yes
2017-08-26 11:36:58 +03:00
Paul Eggert
05f9ffd53c Improve expand-file-name doc
* doc/lispref/files.texi (Relative File Names, Directory Names)
(File Name Expansion):
* doc/lispref/minibuf.texi (Reading File Names):
Document expand-file-name behavior with ~ more clearly
and accurately.
* doc/misc/org.texi (Batch execution): Simplify example
script so that it does not need expand-file-name and thus
will not mishandle file names with leading ~.
2017-08-25 21:14:06 -07:00
Jefferson Carpenter
feecb66b6f Support all perl variable declarators and prefixes (Bug#27613)
* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression)
(perl-font-lock-keywords-2): Match declators 'anon', 'argument', 'has',
'local', 'state', 'supersede', 'let', and 'temp'.

Copyright-paperwork-exempt: yes
2017-08-25 22:50:15 -04:00
Noam Postavsky
a7ed4ec095 ; * doc/lispref/files.texi (File Attributes): Add missing word. 2017-08-25 22:47:51 -04:00
Paul Eggert
2b7e009257 Fix file-attributes race on GNU hosts
* doc/lispref/files.texi (File Attributes):
Document file-attributes atomicity.
* etc/NEWS: Document the fix.
* src/dired.c (file_attributes): New args DIRNAME and FILENAME,
for diagnostics.  All callers changed.  On platforms like
GNU/Linux that support O_PATH, fix a race condition in
file-attributes and similar functions, so that these functions do
not return nonsense if a directory entry is replaced while getting
its attributes.  On non-GNU platforms, do a better (though not
perfect) job of detecting the race, and return nil if detected.
2017-08-25 13:19:45 -07:00
Paul Eggert
9a223dab90 Simplify expand_and_dir_to_file
* src/fileio.c (expand_and_dir_to_file): Simplify by omitting 2nd
argument, since in practice it always has the default value.  All
callers changed.  Prefer C99 style decls in nearby code.
2017-08-25 09:32:09 -07:00
Eli Zaretskii
579890f1c7 ; * src/w32.c (faccessat): Fix last change. (Bug#28207) 2017-08-25 18:01:19 +03:00
Eli Zaretskii
0d2b409398 Fix file-name completion on network shares
* src/w32.c (faccessat): Don't assume that F_OK is non-zero.
(Bug#28207)
2017-08-25 17:43:15 +03:00
Reuben Thomas
690512d2af Fix a FIXME with an exegetical comment
* lisp/progmodes/sh-script.el (sh-builtins): Explain why we have a
regexp for wksh builtins.
2017-08-25 13:59:21 +01:00
Reuben Thomas
38daeca937 Minor docstring language fix
* lisp/progmodes/sh-script.el (sh-show-indent): Remove spurious “the”.
2017-08-25 13:49:06 +01:00
Reuben Thomas
ca30d22fba Remove old commented code from sh-script.el
* lisp/progmodes/sh-script.el (sh-abbrevs): Remove commented function
and variable, commented since 2001.
2017-08-25 13:49:06 +01:00
Stefan Monnier
1bd1658111 * lisp/emacs-lisp/package.el: Don't let failure stop us
(package-activate-1): Don't throw an error for missing deps.
(package-unpack): Don't bother compiling if activation failed.
(package-initialize): Report failures but keep activating other packages.
2017-08-25 02:10:53 -04:00
Paul Eggert
daf434b40d Prefer ‘double’ for FP temps in xterm.c
* src/xterm.c (xm_scroll_callback, xaw_jump_callback)
(x_set_toolkit_scroll_bar_thumb)
(x_set_toolkit_horizontal_scroll_bar_thumb): Prefer ‘double’ to
‘float’ for individual local floating-point temporaries.
2017-08-24 16:17:39 -07:00
Reuben Thomas
bd9ad2ea10 Avoid using string-to-multibyte in ispell.el
* lisp/textmodes/ispell.el (ispell-get-decoded-string): Use
decode-coding-string instead. Note that decode-coding-string returns a
string that satisfies multibyte-string-p even if its input is pure
ASCII and the third argument is t, so the result of
ispell-get-decoded-string is always a multibyte string.
2017-08-24 18:53:28 +01:00
Tino Calancha
22ebde63c9 Store the regexp just when there are matches
* lisp/hi-lock.el (hi-lock-set-pattern): When font-lock-mode is
disabled and there are no matches do not store REGEXP
in hi-lock-interactive-patterns.
2017-08-25 00:24:59 +09:00
Tino Calancha
303481b4ec Keep face available if there are no matches
If font-lock-mode is disabled in the current buffer, and
there are no matches for REGEXP, then keep FACE available
for a next search.
* lisp/hi-lock.el (hi-lock-set-pattern): Add FACE into
hi-lock--unused-faces if font-lock-mode is disabled and
there are no matches.
* test/lisp/hi-lock-tests.el (hi-lock-test-set-pattern): Add test.
2017-08-25 00:09:50 +09:00
Michael Albinus
0332a0ef2b Minor improvements for tramp-interrupt-process, documentation
* doc/lispref/processes.texi (Signals to Processes):
* etc/NEWS: Document interrupt-process-functions.

* lisp/net/tramp.el (tramp-interrupt-process): Test also for
`process-live-p'.

* src/process.c (Vinterrupt_process_functions): Fix docstring.

* test/lisp/net/tramp-tests.el (tramp-test28-interrupt-process):
Extend test.
2017-08-24 15:53:56 +02:00
Reuben Thomas
fa5e63e404 Fix a comment whitespace typo.
src/fileio.c: A double space was added after "..", used in a code
example. Make it a single space.
2017-08-23 23:52:24 +01:00
Reuben Thomas
f8466812e2 Remove old commented code and obsolete comments
* lisp/files.el (locate-dominating-files): Remove old commented
implementation from 9 years ago.  Since the current version
appears (at least to me) not just more efficient but clearer than the
version removed, also delete a comment in the new version referring to
the old version. Remove old commented heuristic code,
and explanatory comments.
2017-08-23 23:52:24 +01:00
Reuben Thomas
c71162e0f1 Remove old duplicate commented code
* lisp/files.el (file-relative-name): Remove old commented version,
replaced 14 years ago in commit 753ad9889.
2017-08-23 23:52:24 +01:00
Tom Tromey
ad3cd227aa Add conf-toml-mode
* etc/NEWS: Mention conf-toml-mode.
* lisp/files.el (auto-mode-alist): Add entry for .toml.
* lisp/textmodes/conf-mode.el (conf-toml-mode-syntax-table)
(conf-toml-font-lock-keywords): New defvars.
(conf-toml-mode): New mode.
2017-08-23 16:06:48 -06:00
Alan Third
9538ba6a0f Use lisp type in log message (bug#28176)
* src/nsimage.m (ns_load_image): Use make_number on index.
2017-08-23 21:13:22 +01:00
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