* lisp/ibuffer.el (ibuffer-mode-operate-map): Move the diff
command to the "Operate" menu, and remove the customisation
entry to make the "View" menu more logical (bug#1150).
* lisp/progmoes/python.el (python-font-lock-keywords): Clean up the exception
list, adding a number of new Python 3 exceptions and moving some exceptions
to the Python 2 and 3 list as Python 2.7 includes them.
Anders Lindgren [Tue, 26 Apr 2016 18:58:52 +0000 (20:58 +0200)]
Fix bug#22891: wrong terminal width when a fringe width is zero.
When either fringe width is zero, Emacs reserved one column for a
continuation glyph. Terminal windows does not take this into
account when the frame is resized.
* lisp/window.el (window-adjust-process-window-size): Use
`window-max-chars-per-line' instead of `window-body-width'.
* lisp/term.el (term-window-width): Remove function. (It does the
same as `window-max-chars-per-line' but without recent bug fixes.)
(term-mode): Use `window-max-chars-per-line' instead of
`term-window-width'.
* lisp/textmodes/css-mode.el (css-value-class-alist): Add `calc()' as
a completion candidate for several value classes.
(css--value-class-lookup): Return only unique results.
* test/lisp/textmodes/css-mode-tests.el
(css-test-property-values-no-duplicates)
(css-test-value-class-lookup): Update to reflect the above changes.
Paul Eggert [Tue, 26 Apr 2016 16:12:14 +0000 (09:12 -0700)]
Fix socketd fd startup bug that I introduced
Problem reported by Matthew Leach in:
http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00778.html
* src/emacs.c (main): Indicate more clearly the coupling between
the --daemon option and init_process_emacs.
* src/lisp.h: Adjust to API changes.
* src/process.c (set_external_socket_descriptor):
Remove, replacing by ...
(init_process_emacs): ... passing the socket FD here instead.
All uses changed.
Tao Fang [Mon, 25 Apr 2016 23:24:44 +0000 (01:24 +0200)]
Fix: (void-variable url-http-response-status)
* lisp/url/url-http.el
(url-https-proxy-after-change-function): Display the error
message before doing the callback to avoid a void variable
situation (bug#23290).
* lisp/mail/smtpmail.el (smtpmail-via-smtp): Move the sending
of the data end marker from here... (bug#23020).
(smtpmail-send-data): ... to here, so that we don't get a
"Sending done" before we've sent the final "." (which can make
the SMPT server reject the email.
Alan Mackenzie [Mon, 25 Apr 2016 17:57:24 +0000 (17:57 +0000)]
Fix spurious fontification of "for (; a * b;)" in CC Mode.
* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Check for being
inside the parens of a for statement and after a semicolon near the beginning
of the lambda form.
Paul Eggert [Mon, 25 Apr 2016 17:41:29 +0000 (10:41 -0700)]
New function ‘char-from-name’
This also fixes the mishandling of "\N{CJK COMPATIBILITY
IDEOGRAPH-F900}", "\N{VARIATION SELECTOR-1}", etc.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00614.html
* doc/lispref/nonascii.texi (Character Codes), etc/NEWS: Document this.
* lisp/international/mule-cmds.el (char-from-name): New function.
(read-char-by-name): Use it. Document that "BED" is treated as
a name, not as a hexadecimal number. Reject out-of-range integers,
floating-point numbers, and strings with trailing junk.
* src/lread.c (character_name_to_code): Call char-from-name
instead of inspecting ucs-names directly, so that we handle
computed names like "VARIATION SELECTOR-1". Do not use an auto
string, since char-from-name might GC.
* test/src/lread-tests.el: Add tests for new behavior, and
fix some old tests that were wrong.
; Run find-function-after-hook after finding a symbol
* lisp/emacs-lisp/find-func.el (find-library):
* lisp/help-mode.el (help-function-def, help-variable-def):
Run `find-function-after-hook' inside the help-function of the
buttons (bug#22583).
Alan Mackenzie [Mon, 25 Apr 2016 17:08:26 +0000 (17:08 +0000)]
c-forward-<>-arglist no longer directly applies face properties in Java Mode.
This allows the calling of c-restore-<>-properties from c-common-init without
the test suite giving spurious errors.
* lisp/progmodes/cc-engine.el (c-forward-<>-arglist): Remove the form that
sets face properties.
(c-forward-<>-arglist-recur): Reformulate the bit that handles types inside
template brackets using c-inside-<>-type-key. Don't bind
c-record-type-identifiers or c-record-found-types around the recursive call,
allowing positions of found types to flow back to the caller.
* lisp/progmodes/cc-langs.el (c-inside-<>-type-kwds, c-inside-<>-type-key):
new lang consts/var.
* lisp/progmodes/cc-mode.el (c-common-init): Don't remove
c-restore-<>-properties from the list of functions called at mode
initialization.
Alan Mackenzie [Mon, 25 Apr 2016 15:19:58 +0000 (15:19 +0000)]
Add fontification for a C declaration which looks like a function call.
For example, "t1 *fn (t2 *b);".
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Add new variable
at-decl-start, setting it to whether the putative decl starts immediately
after ; or { or }. Accept such a construct as a decl when at-decl-start is
non-nil.
* lisp/progmodes/cc-langs.el (c-pre-start-tokens): New language variable.
Eli Zaretskii [Mon, 25 Apr 2016 08:50:37 +0000 (11:50 +0300)]
Don't mirror slashes in convert-standard-filename on MS-Windows
* lisp/w32-fns.el (w32-convert-standard-filename): Don't mirror
slashes into backslashes. This avoids producing ugly file names,
and is deemed no longer necessary, and should certainly be
unrelated to which shell is in use.
Revert the disputed VC change and update the tests
* lisp/vc/vc-hooks.el (vc-working-revision):
Remove the previous change.
(vc-state): Same. And update the old, incorrect comment about
unregistered files
(http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00526.html).
* test/lisp/vc/vc-tests.el (vc-test--state): Remove the check
calling `vc-state' on default-directory (VC state is undefined
for directories). Check that `vc-state' returns nil where it
returned `unregistered' before. Remove all checks comparing
invocations with the backend passed in explictly and without.
(vc-test--working-revision): Remove all checks comparing
invocations with the backend passed in explictly and without.
Update comments, and add a new one.
Paul Eggert [Sun, 24 Apr 2016 19:48:34 +0000 (12:48 -0700)]
Merge from origin/emacs-25
78f9af7 ; ChangeLog fixes 162e549 * admin/authors.el (authors-ignored-files): Additions. 2b31a0c In x_set_window_size restore do_pending_window_change calls 401857e Fix Alt-modified keys on some European MS-Windows keyboards a77cf24 Document 'help-go-forward' 1ba947f Revert "Allow to customize names of executables used by grep.el" 570e0fa Revert "Don't use 'find-program'" 645f4ef Revert "Use 'grep-find-program' in check-declare.el" aa03257 Clarify documentation of 'dired-mark-files-containing-regexp' ce0d8c7 Make tmm-menubar work in correct order again b8d5a8f Remove the Meta-CVS VC backend
* test/lisp/textmodes/css-mode-tests.el (css-test-property-values):
Take the above into account.
(css-test-property-values-no-duplicates): Test that duplicates aren't
returned by `css--property-values'.
Michael Albinus [Sun, 24 Apr 2016 12:59:05 +0000 (14:59 +0200)]
Some improvements in vc
* lisp/vc/vc-hooks.el (vc-state, vc-working-revision):
Check, whether FILE is registered.
* lisp/vc/vc-rcs.el (vc-rcs-checkout-model): Return `locking'
for nonexistent files.
* test/lisp/vc/vc-tests.el (w32-application-type): Declare.
(vc-test--revision-granularity-function)
(vc-test--unregister-function): Use `vc-call-backend'.
(vc-test--run-maybe-unsupported-function): New defmacro.
(vc-test--register, vc-test--state, vc-test--working-revision)
(vc-test--checkout-model): Use it. Fix also expected results.
(vc-test-src02-state, vc-test-rcs04-checkout-model): They pass now.
* url-http.el (url-http-user-agent-string): Compute User-Agent
string dynamically.
(url-http--user-agent-default-string): New function.
* url-vars.el (url-privacy-level): Allow `emacs' in list of
information not to send.
(url-user-agent): Add nil and `default' options; do not
pre-compute value.
Steve Purcell [Sun, 24 Apr 2016 11:44:37 +0000 (13:44 +0200)]
Allow _ characters in SQL prompts
* lisp/progmodes/sql.el (sql-product-alist): Allow _
characters in SQL prompts (bug#22596).
Fixes issue 22596, whereby "_" is now not considered a word constituent
character in sql-interactive-mode, so prompts like "foo_dev# " are not
correctly detected. Rather than piggy-back on the symbol table, we
explicitly match against alphanumeric chars or "_".
When autoload-timestamps is nil, use a dummy timestamp rather than "t".
* lisp/emacs-lisp/autoload.el (autoload--non-timestamp): New constant.
(autoload-generate-file-autoloads, autoload-find-destination)
(update-directory-autoloads): Use autoload--non-timestamp.
(vc-git-mode-line-string): Don't use `replace-regexp-in-string'
* lisp/vc/vc-git.el (vc-git-mode-line-string): Use `substring'
instead of `replace-regexp-in-string', because REV can be nil
(e.g. when FILE is a directory, bug#23344), and we actually know
we only need the first 4 characters.
Martin Rudalics [Fri, 22 Apr 2016 09:56:03 +0000 (11:56 +0200)]
In x_set_window_size restore do_pending_window_change calls
* src/xterm.c (x_set_window_size):
* src/w32term.c (x_set_window_size): Restore
do_pending_window_change calls after their stupid removal on
2015-08-31.
Paul Eggert [Fri, 22 Apr 2016 02:26:34 +0000 (19:26 -0700)]
Improve character name escapes
* doc/lispref/nonascii.texi (Character Properties):
Avoid duplication of Unicode names. Reformat examples to fit in
narrow pages.
* doc/lispref/objects.texi (General Escape Syntax):
Simplify and better-organize explanation of \N{...} escapes.
* src/character.h (CHAR_SURROGATE_PAIR_P): Remove; unused.
(char_surrogate_p): New inline function.
* src/lread.c: Do not include string.h; no longer needed.
(invalid_character_name, check_scalar_value): Remove; the ideas
behind these functions are now bundled into character_name_to_code.
(character_name_to_code): Remove undocumented support for "CJK
IDEOGRAPH-XXXX" names, as "U+XXXX" suffices. Reject monstrosities
like "\N{U+-0}" and null bytes in \N escapes. Reject floating
point in \N escapes instead of returning garbage. Use
AUTO_STRING_WITH_LEN to lessen pressure on the garbage collector.
* test/src/lread-tests.el (lread-char-number, lread-char-name)
(lread-string-char-number, lread-string-char-name):
Test runtime behavior, not compile-time, as the test framework
is not set up to test compile-time.
(lread-char-surrogate-1, lread-char-surrogate-2)
(lread-char-surrogate-3, lread-char-surrogate-4)
(lread-string-char-number-2, lread-string-char-number-3):
New tests.
(lread-string-char-number-1): Rename from lread-string-char-number.
Philipp Stephani [Thu, 21 Apr 2016 21:51:30 +0000 (14:51 -0700)]
Use 'ucs-names' for character name escapes
* lread.c (invalid_character_name, check_scalar_value)
(parse_code_after_prefix, character_name_to_code): New helper
functions that use 'ucs-names' and parsing for CJK ideographs.
(read_escape): Use helper functions.
(syms_of_lread): New symbol 'ucs-names'.
* test/src/lread-tests.el: New tests; fix a couple of bugs in
existing tests.
Philipp Stephani [Thu, 21 Apr 2016 21:45:22 +0000 (14:45 -0700)]
Implement named character escapes, similar to Perl
* lread.c (init_character_names): New function.
(read_escape): Read Perl-style named character escape sequences.
(syms_of_lread): Initialize new variable 'character_names'.
* test/src/lread-tests.el (lread-char-empty-name): Add test file
for src/lread.c.
Avoid run-time dependency on libwinpthread DLL on MS-Windows
* nt/mingw-cfg.site (ac_cv_search_clock_gettime)
(ac_cv_func_clock_gettime, ac_cv_func_clock_settime): Force to not
present, so that MinGW64 builds don't depend on libwinpthread.
(Bug#22959)
Matthew Leach [Thu, 21 Apr 2016 16:16:41 +0000 (19:16 +0300)]
Add LIBSYSTEMD to the list of supported features
* configure.ac: Add LIBSYSTEMD to EMACS_CONFIG_FEATURES and print a
message at the end of configure stating whether Emacs will be build
with libsystemd support.
Fix Alt-modified keys on some European MS-Windows keyboards
* src/w32fns.c (deliver_wm_chars): If the reported character is
ASCII, AND Meta modifier is a candidate, behave as if Meta is
present, i.e. fall back to the legacy code. (Bug#23251)
Eli Zaretskii [Wed, 20 Apr 2016 14:52:25 +0000 (17:52 +0300)]
Clarify documentation of 'dired-mark-files-containing-regexp'
* doc/emacs/dired.texi (Marks vs Flags): Clarify that for files
visited in buffers, 'dired-mark-files-containing-regexp' searches
the buffer rather than the file on disk. (Bug#22694)
* lisp/dired.el (dired-mark-files-containing-regexp): Clarify that
for files visited in buffers, 'dired-mark-files-containing-regexp'
searches the buffer rather than the file on disk. (Bug#22694)
Paul Eggert [Wed, 20 Apr 2016 07:06:01 +0000 (00:06 -0700)]
Fix org-timestamp-change typo
Problem reported by Peter Münster (Bug#23299).
* lisp/org/org.el (org-timestamp-change): Fix typo that relied
on undocumented behavior in ‘encode-time’. In practice the
old code used local time, so use that.
Paul Eggert [Wed, 20 Apr 2016 00:22:22 +0000 (17:22 -0700)]
Avoid AC_PREPROC_IFELSE glitch in configure.ac
Problem reported by Angelo Graziosi in:
http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00545.html
* configure.ac (gl_gcc_warnings): Work around an Autoconf glitch:
AC_PREPROC_IFELSE doesn’t generate a simple shell command.
Eli Zaretskii [Tue, 19 Apr 2016 15:06:52 +0000 (18:06 +0300)]
Make tmm-menubar work in correct order again
* lisp/tmm.el (tmm-prompt): Don't reverse 'tmm-km-list' right at the
beginning; instead, pass a reversed copy to 'tmm--completion-table'.
(Bug#23309)
(tmm-menubar): Fix an off-by-one error in determining the menu
item when the function is called with a non-nil 'x-position'
argument.
Michael Albinus [Tue, 19 Apr 2016 09:05:55 +0000 (11:05 +0200)]
autorevert: Resume with polling if file is deleted
* lisp/autorevert.el: Use consistent wording in comments and
docstrings.
(auto-revert-mode): Add local function to `kill-buffer-hook'.
(auto-revert-notify-handler): Improve handling of `stopped' event.
* test/lisp/autorevert-tests.el
(auto-revert-test02-auto-revert-deleted-file): New test.
(auto-revert-test03-auto-revert-tail-mode)
(auto-revert-test04-auto-revert-mode-dired): Rename them.
Paul Eggert [Mon, 18 Apr 2016 21:05:31 +0000 (14:05 -0700)]
Merge from origin/emacs-25
ac00a92 Make sh-electric-here-document-mode accessible in sh-mode-hoo... 3287f48 ; Add entry to MAINTAINERS b85981f * configure.ac (HAVE_MODULES): Exclude gnu-kfreebsd from prev... 0f33284 Make use of rectangle-preview custom variable. aa0d83a Make use of rectangle-preview face. 33bef6e Use 'grep-find-program' in check-declare.el a8560e5 Improve "C-h S" for cl-lib symbols 52e798b Fix minor issues with removing left or right fringes d6ffd64 Speed up redisplay in ansi-term mode 4ab671c Simplify 8-bit character handling by terminal for 'raw-text' f3653ec * configure.ac (HAVE_MODULES): Treat gnu like gnu-linux. (Bu... ab849b7 Fix w32 memory-management problem when extending buffer text
Stefan Monnier [Mon, 18 Apr 2016 16:27:58 +0000 (12:27 -0400)]
* lisp/textmodes/ispell.el: Compile with lexical-binding
(declare-function): Don't define any more.
(ispell-check-minver, ispell-looking-back): Tweak definition so that
the compiler can obviously know that it's always defined.
(ispell-debug-buffer): Declare var.
(ispell-hunspell-fill-dictionary-entry)
(ispell-parse-hunspell-affix-file, ispell-hunspell-add-multi-dic)
(ispell-find-hunspell-dictionaries, ispell-set-spellchecker-params)
(ispell-command-loop): Avoid add-to-list on local variables.
Paul Eggert [Mon, 18 Apr 2016 05:41:14 +0000 (22:41 -0700)]
Minor fixups for external socket launching
* configure.ac (HAVE_LIBSYSTEMD): Change earliest version to 222.
* doc/emacs/misc.texi (Emacs Server):
* etc/NEWS: Spelling and doc fixes.
* src/emacs.c (main) [HAVE_LIBSYSTEMD]:
Check for sd_is_socket returning positive, not zero.
* src/process.c (external_sock_fd): Instead of initializing here ...
(init_process_emacs): ... initialize it here, so that it does the
right thing after dump/restore.
(connect_network_socket): Simplify socket_to_use test.
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(vhdl-mode): No longer set comment-padding.
(vhdl-begin-p): Handle missing space between keyword and parenthesis.
(vhdl-beginning-of-statement-1): Fix indentation for "else generate".
(vhdl-template-else, vhdl-template-elsif): Support generate statement.
(vhdl-re-search-forward, vhdl-re-search-backward): Save match data.
* lisp/gnus/gnus-art.el (gnus-use-idna): Default to t (since
Emacs comes with IDNA support built in).
(article-decode-idna-rhs): Use `puny-decode-domain' instead of
`idna-to-unicode'.
Paul Eggert [Sun, 17 Apr 2016 02:49:15 +0000 (19:49 -0700)]
Tweak configure.ac syntax in recent module patch
* configure.ac: Use proper Autoconf parenthesization in
recent HAVE_MODULES patch. Although this doesn’t fix any bugs,
the previous syntax was confusing.