* test/automated/file-notify-tests.el ()
(file-notify-test03-autorevert)
(file-notify-test04-file-validity)
(file-notify-test04-file-validity-remote)
(file-notify-test05-dir-validity)
(file-notify-test05-dir-validity-remote): Adapt docstring.
(file-notify-test04-file-validity): Let events arrive before
calling final `file-notify-valid-p'. Do not ignore errors.
(file-notify-test05-dir-validity): Do not manipulate
`temporary-file-directory', it isn't necessary. Let events arrive
before calling final `file-notify-valid-p'. Do not ignore errors.
Paul Eggert [Mon, 14 Sep 2015 16:31:23 +0000 (09:31 -0700)]
Don’t double-encode non-ASCII for mail client
* lisp/mail/mailclient.el (mailclient-encode-string-as-url):
Use RFC 6068’s list of unreserved characters.
(mailclient-send-it): When encoding the body as a URL,
first decode it as per Content-Type: and Content-Transfer-Encoding:,
as URLs must use percent-encoded UTF-8 (Bug#21471).
Alan Mackenzie [Sat, 12 Sep 2015 08:54:44 +0000 (08:54 +0000)]
Elisp mode: Make font-lock and imenu handle escaped characters in symbols
Fixes debbugs#21449.
lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression)
(lisp--el-match-keyword, lisp-el-font-lock-keywords-1)
(lisp-cl-font-lock-keywords-1, lisp-el-font-lock-keywords-2)
(lisp-cl-font-lock-keywords-2, lisp-string-in-doc-position-p):
Insert "\\|\\\\." into regexps which match symbols.
Eli Zaretskii [Mon, 14 Sep 2015 07:31:17 +0000 (10:31 +0300)]
Report file-notify-error in w32notify.c
* src/w32notify.c (report_w32notify_error): New function.
(Fw32notify_add_watch, Fw32notify_rm_watch): Use it to report
errors, instead of calling report_file_error. (Bug#21432)
Paul Eggert [Sun, 13 Sep 2015 18:55:28 +0000 (11:55 -0700)]
Port Unicode char detection to FreeBSD+svgalib
Problem reported by Ashish SHUKLA in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00531.html
* configure.ac: Check for struct unipair.unicode instead of for
<linux/kd.h>, since that’s more specific to what the code actually needs.
* src/terminal.c: Use HAVE_STRUCT_UNIPAIR_UNICODE, not HAVE_LINUX_KD_H.
Eli Zaretskii [Sun, 13 Sep 2015 10:15:55 +0000 (13:15 +0300)]
Fix vertical cursor motion across overlay strings with newlines
* src/indent.c (Fvertical_motion): Don't leave point in the middle
of an overlay string with newlines, as that will position the
cursor after the string at whatever column is there. (Bug#21468)
Stefan Monnier [Sat, 12 Sep 2015 00:00:05 +0000 (20:00 -0400)]
Merge syntax-propertize--done and parse-sexp-propertize-done
* lisp/emacs-lisp/syntax.el (syntax-propertize--done): Remove.
(syntax-propertize): Set syntax-propertize--done even if
syntax-propertize-function is nil. Avoid recursive invocations.
(syntax-propertize-chunks): New var.
(internal--syntax-propertize): Use it. Rename from syntax--jit-propertize.
Simplify.
(parse-sexp-propertize-function): Don't set any more.
* src/syntax.c (SETUP_SYNTAX_TABLE): Call parse_sexp_propertize as needed.
(parse_sexp_propertize): Don't assume charpos is not yet propertized.
Call Qinternal__syntax_propertize instead of
Vparse_sexp_propertize_function. Truncate e_property if needed.
(update_syntax_table_forward): Streamline.
(syms_of_syntax): Define Qinternal__syntax_propertize.
(syntax_propertize__done): Rename from parse_sexp_propertize_done.
Paul Eggert [Fri, 11 Sep 2015 18:04:24 +0000 (11:04 -0700)]
Prefer straight quoting in some text files
Mostly this just changes ` to ' in static text. Some exceptions:
* INSTALL.REPO: Use curved quotes, as the diagnostic in question
typically does that now.
* admin/quick-install-emacs (TRY, top level):
Use straight quoting in diagnostics.
* src/README: Fix working-directory confusion.
Michael Albinus [Fri, 11 Sep 2015 09:40:33 +0000 (11:40 +0200)]
Improve file notifications in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Set proper events to watch for.
(tramp-sh-file-gvfs-monitor-dir-process-filter): Report only
watched events.
Nicolas Petton [Thu, 10 Sep 2015 21:49:56 +0000 (23:49 +0200)]
Add seq-find
This function is similar to `seq-some' but returns the found element.
In the cases where nil can be the found element, a sentinel optional
argument can be provided to avoid ambiguities.
* lisp/emacs-lisp/seq.el (seq-find): New function.
* test/automated/seq-tests.el (test-seq-find): Add tests for `seq-find'.
* doc/lispref/sequences.texi (Sequence Functions): Add documentation for
seq-find.
Paul Eggert [Thu, 10 Sep 2015 17:10:54 +0000 (10:10 -0700)]
Revert some stray curved quotes I missed earlier
Problem reported by David Kastrup in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00440.html
* lisp/international/mule-cmds.el (leim-list-header):
Use format-message with an ASCII-only format.
* test/automated/file-notify-tests.el: Use lexical-binding
(file-notify--test-cleanup): New function.
(file-notify-test00-availability, file-notify-test01-add-watch)
(file-notify-test02-events, file-notify-test03-autorevert): Use it.
(file-notify--test-with-events): New macro.
(file-notify-test02-events): Use it.
Paul Eggert [Thu, 10 Sep 2015 09:43:59 +0000 (02:43 -0700)]
Add patch-sending instructions to git-workflow
From a suggestion by Mitchel Humpherys in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00421.html
* admin/notes/git-workflow (Sending patches): New section.
Paul Eggert [Thu, 10 Sep 2015 09:39:13 +0000 (02:39 -0700)]
Port to GIFLIB 5.0.6 and later
Problem reported by Mitchel Humpherys in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00420.html
* src/image.c (HAVE_GIFERRORSTRING) [HAVE_GIF]: New macro.
(GifErrorString, init_gif_functions) [HAVE_GIF && WINDOWSNT]:
(gif_load) [HAVE_GIF]: Use it.
Paul Eggert [Wed, 9 Sep 2015 22:40:49 +0000 (15:40 -0700)]
Refix movemail GCC pacification
Problem reported by Ken Brown in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00406.html
* lib-src/movemail.c (main): Fix previous change.
* test/automated/file-notify-tests.el (file-notify--test-events): New
variable.
(file-notify--test-event-handler): Append received event to
file-notify--test-events for later analysis.
(file-notify-test02-events): Assert that the expected notifications have
arrived in the expected order.
Stefan Monnier [Wed, 9 Sep 2015 19:14:52 +0000 (15:14 -0400)]
Make syntax.c call syntax-propertize on demand
* lisp/emacs-lisp/syntax.el (syntax--jit-propertize): New function.
(parse-sexp-propertize-function): Use it.
(syntax-propertize): Disable parse-sexp-propertize-function.
* src/syntax.c (parse_sexp_propertize, update_syntax_table_forward):
New functions.
(syms_of_syntax): New vars `parse-sexp-propertize-done' and
`parse-sexp-propertize-function'.
* src/syntax.h (struct gl_state_s): Add `e_property_truncated' field.
(UPDATE_SYNTAX_TABLE_FORWARD): Use update_syntax_table_forward.
(SETUP_BUFFER_SYNTAX_TABLE): Set e_property_truncated.
* lisp/progmodes/elisp-mode.el (elisp-byte-code-syntax-propertize):
Don't assume `point' is set.
Paul Eggert [Wed, 9 Sep 2015 17:47:53 +0000 (10:47 -0700)]
Define internal-char-font even if --without-x
The function is used now even in non-graphical environments.
Problem reported by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00401.html
* src/font.c (Finternal_char_font): Move here ...
* src/fontset.c (Finternal_char_font): ... from here.
Eli Zaretskii [Wed, 9 Sep 2015 15:56:06 +0000 (18:56 +0300)]
Fix display of complex local data types in GDB-MI
* lisp/progmodes/gdb-mi.el (gdb-locals-handler-custom): If a
variable has no value, display "<complex data type>" as a
placeholder, instead of a confusing "nil". (Bug#21438)
More robust check for `package-initialize' calls in init file.
This function accepts an optional argument, but calls passing
an argument would not have been detected.
Paul Eggert [Wed, 9 Sep 2015 09:21:16 +0000 (02:21 -0700)]
Improvements for curved quotes on Linux consule
This should help Emacs work better out-of-the-box on Linux consoles,
which have only limited support for displaying Unicode characters.
Also, undo the recent change that caused text-quoting-style to
affect quote display on terminals, so that the two features are
independent. See Alan Mackenzie in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00244.html
Finally, add a style parameter to startup--setup-quote-display,
so that this function can also be invoked after startup, with
different styles depending on user preference at the time.
* configure.ac: Check for linux/kd.h header.
* doc/emacs/display.texi (Text Display): Document quote display.
* doc/lispref/display.texi (Active Display Table):
* etc/NEWS:
* lisp/startup.el (startup--setup-quote-display, command-line):
text-quoting-style no longer affects quote display.
* doc/lispref/frames.texi (Terminal Parameters): Fix typo.
* lisp/international/mule-util.el (char-displayable-p):
* lisp/startup.el (startup--setup-quote-display):
On a text terminal supporting glyph codes, use the reported
glyph codes instead of the terminal coding system, as this
is more accurate on the Linux console.
* lisp/startup.el (startup--setup-quote-display):
New optional arg STYLE.
* src/fontset.c (Finternal_char_font):
Report glyph codes for a text terminal, if they are available.
Currently this is supported only for the Linux console.
* src/termhooks.h (struct terminal): New member glyph-code-table.
* src/terminal.c [HAVE_LINUX_KD_H]: Include <errno.h>, <linux/kd.h>.
(calculate_glyph_code_table) [HAVE_LINUX_KD_H]: New function.
(terminal_glyph_code): New function.
Stefan Monnier [Tue, 8 Sep 2015 14:25:59 +0000 (10:25 -0400)]
Remove a few simple cases of global redisplay
* src/dispnew.c (redraw_frame): Don't redisplay all frames.
* src/xdisp.c (echo_area_display): Set the frame's `redisplay' bit
rather than returning a "resized_p" boolean.
(redisplay_internal): Adjust call accordingly.
* src/xfaces.c (free_realized_faces): Don't redisplay all frames.
(free_all_realized_faces): Set windows_or_buffers_changed so as to ease
tracking of this undesirable situation.
Artur Malabarba [Mon, 7 Sep 2015 22:51:42 +0000 (23:51 +0100)]
* lisp/emacs-lisp/package.el: Reduce autoloading before compiling
(package--autoloads-file-name)
(package--activate-autoloads-and-load-path): New function.
(package-activate-1): Delegate autoloading and load-path
configuration to `package--activate-autoloads-and-load-path'.
(package--compile): Before compilation, call
`package--activate-autoloads-and-load-path' instead of
`package-activate-1'.
Eli Zaretskii [Mon, 7 Sep 2015 15:26:36 +0000 (18:26 +0300)]
Fix deletion of symlinks to directories on MS-Windows
* src/w32.c (sys_unlink): If 'unlink' fails, and the argument is a
symlink to a directory, try again with 'rmdir'.
(is_symlink): If the argument is a symlink to a directory, set a
bit in the return value to indicate that fact.
Artur Malabarba [Sun, 6 Sep 2015 12:52:54 +0000 (13:52 +0100)]
* lisp/emacs-lisp/package.el (package-initialize): Set enable-at-startup
When `package-initialize' is called as part of loading the init file,
the user probably doesn't want it to be called again afterwards. In this
situation, `package-initialize' now sets `package-enable-at-startup' to
nil to prevent that. The user can have the old behaviour by setting this
variable to t after the call to `package-initialize'. (Bug#21423)
* doc/emacs/package.texi (Package Installation): Document it
* doc/lispref/package.texi (Packaging Basics): Document it
Allow even one non-regular character before the implicit tag name
* lisp/progmodes/etags.el (etags-tags-completion-table):
Allow even one non-regular character before the implicit tag name.
Reported at http://emacs.stackexchange.com/questions/15269/.
* net/ntlm.el (ntlm): New customization group.
(ntlm-compatibility-level): New defcustom.
(ntlm-compute-timestamp): New function.
(ntlm-generate-nonce): Likewise.
(ntlm-build-auth-response): Add support for NTLMv2 authentication.
Artur Malabarba [Sun, 6 Sep 2015 13:14:43 +0000 (14:14 +0100)]
* lisp/emacs-lisp/package.el: Rename custom faces
All of the recently introduced faces, like `package-name-face', have
been renamed to no end in `-face' to comply with the convention
described in (info "(elisp) Defining Faces").
(package-name, package-description)
(package-status-built-in, package-status-external)
(package-status-available, package-status-new)
(package-status-held, package-status-disabled)
(package-status-installed, package-status-dependency)
(package-status-unsigned, package-status-incompat)
(package-status-avail-obso): New faces.
(package-menu--print-info-simple): Use them.
Eric Abrahamsen [Sun, 6 Sep 2015 12:47:43 +0000 (12:47 +0000)]
nnimap.el: Handle nil arg to nnimap-request-group
* lisp/gnus/nnimap.el (nnimap-request-group): Handle nil "info" arg.
This arg isn't always passed in, check it's not nil before making it
into a list. The active arg will also be nil if the group is new,
check for that.
Michael Albinus [Sun, 6 Sep 2015 12:21:56 +0000 (14:21 +0200)]
File notifications: Support renaming over directory boundaries
* lisp/filenotify.el (file-notify-handle-event):
(file-notify--pending-event): Adapt docstring.
(file-notify--descriptor, file-notify-callback): Reimplement in
order to support renaming over directory boundaries.
(file-notify-add-watch): Adapt `file-notify--descriptor' call.
* doc/lispref/os.texi (File Notifications): Remove limitation of
file renaming to the same directory.
Nicolas Petton [Sat, 5 Sep 2015 22:51:35 +0000 (00:51 +0200)]
Improve the semantic of map-some
Update map-some to return the returned by the predicate, similar to
seq-some.
* lisp/emacs-lisp/map.el (map-some): Update the function to return the
return value of the predicate.
* test/automated/map-tests.el (test-map-some): Update the test to check
for non-nil values only.
Nicolas Petton [Sat, 5 Sep 2015 22:45:48 +0000 (00:45 +0200)]
Rename map-contains-key-p and map-some-p
Remove the "-p" suffix from both function names.
* lisp/emacs-lisp/map.el (map-contains-key, map-some): Rename the functions.
* test/automated/map-tests.el (test-map-contains-key, test-map-some):
Update both test functions.
Nicolas Petton [Sat, 5 Sep 2015 22:26:17 +0000 (00:26 +0200)]
Improve the semantic of seq-some
Update seq-some to return non-nil if the predicate returns non-nil for
any element of the seq, in which case the returned value is the one
returned by the predicate.
* lisp/emacs-lisp/seq.el (seq-some): Update the function and its
docstring.
* test/automated/seq-tests.el (test-seq-some): Add a regression test.
* doc/lispref/sequences.texi (Sequence Functions): Update the
documentation for seq-some.
Nicolas Petton [Sat, 5 Sep 2015 22:05:52 +0000 (00:05 +0200)]
Rename seq-some-p to seq-some and seq-contains-p to seq-contains
* lisp/emacs-lisp/seq.el (seq-some, seq-contains): Rename the functions
without the "-p" prefix.
* test/automated/seq-tests.el (test-seq-some, test-seq-contains): Update
the tests accordingly.
* doc/lispref/sequences.texi (Sequence Functions): Update the
documentation for seq.el.
Paul Eggert [Sat, 5 Sep 2015 18:22:29 +0000 (11:22 -0700)]
Fix fix for describe-function keybinding confusion
This fixes a bug introduced by the previous patch.
* lisp/help-fns.el (help-fns--signature):
Last arg of help-fns--signature is now a buffer, or nil if a
raw signature is wanted. All callers changed.
(describe-function-1): Use this to do the right thing with signatures.
Paul Eggert [Sat, 5 Sep 2015 15:50:34 +0000 (08:50 -0700)]
Fix describe-function keybinding confusion
* lisp/help-fns.el (describe-function-1): Compute signature
in the original buffer, not in standard-output, so that
substitute-command-keys uses the proper keybindings.
This fixes Bug#21412, introduced in commit
2015-06-11T10:23:46-0700!eggert@cs.ucla.edu.
Robert Pluim [Sat, 5 Sep 2015 08:37:29 +0000 (11:37 +0300)]
Avoid read error messages from 'inotify'
* src/process.c (wait_reading_process_output): Add a
'tls_available' set and manipulate it instead of 'Available' when
checking TLS inputs. Assign the value to 'Available' only if we
find any TLS data waiting to be read. This avoids error messages
from 'inotify' that tries to read data it shouldn't. (Bug#21337)
Philip [Sat, 5 Sep 2015 08:08:57 +0000 (11:08 +0300)]
Fix segfaults due to using a stale face ID
* src/xdisp.c (forget_escape_and_glyphless_faces): New function.
(display_echo_area_1, redisplay_internal): Call it to avoid
reusing stale face IDs for 'escape-glyph' and 'glyphless-char'
faces, which could case a segfault if the frame's face cache was
freed since the last redisplay. (Bug#21394)
* src/xfaces.c (free_realized_faces): Call forget_escape_and_glyphless_faces.
* src/dispextern.h (forget_escape_and_glyphless_faces): Add prototype.