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.
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)
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.
* 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.
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.
Mark Oteiza [Sat, 16 Apr 2016 18:40:17 +0000 (14:40 -0400)]
Make sh-electric-here-document-mode accessible in sh-mode-hook. (Bug#3226)
* lisp/progmodes/sh-script.el (sh-mode-hook): Add
sh-electric-here-document-mode as an option and the default value.
(sh-mode): Mention sh-mode-hook in docstring.
(sh-mode): Remove sh-electric-here-document-mode invocation.
Eli Zaretskii [Sat, 16 Apr 2016 10:53:17 +0000 (13:53 +0300)]
Fix minor issues with removing left or right fringes
* lisp/window.el (window-max-chars-per-line): Account for
'left-fringe-width' and 'right-fringe-width' variables.
* doc/lispref/windows.texi (Window Sizes): Document the effect on
window text width when setting the width of one or both fringes to
zero.
* doc/emacs/display.texi (Fringes): Document the effect on window
text width when setting the width of one or both fringes to zero.
(Bug#22891)
Philipp Stephani [Sat, 16 Apr 2016 09:55:17 +0000 (12:55 +0300)]
Simplify 8-bit character handling by terminal for 'raw-text'
* lisp/international/mule.el (set-keyboard-coding-system): Treat
'raw-text' as another coding type that requires 8-bit characters.
* lisp/xt-mouse.el (xterm-mouse--read-coordinate): Use 'no-conversion'
instead of 'latin-1'.
Eli Zaretskii [Fri, 15 Apr 2016 14:26:37 +0000 (17:26 +0300)]
Fix w32 memory-management problem when extending buffer text
* src/w32heap.c (mmap_realloc): Only attempt extending a region if
the following region has the same allocation base. Also, use the
original allocation base and enlarged size to commit reserved
memory, to ensure that the allocation base stays at its original
value. This fixes several hard-to-debug problems whereby part of
buffer text was overwritten with binary nulls, because
mmap_realloc copied only part of buffer text when extending it.
See
http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00325.html
and http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23223#55 for two
examples of the related problems.
Paul Eggert [Thu, 14 Apr 2016 15:21:34 +0000 (08:21 -0700)]
substitute-command-keys keeps quotes’ text props
Problem reported by Clément Pit--Claudel (Bug#23254).
* src/doc.c: Include intervals.h.
(Fsubstitute_command_keys): If the only substitutions are for
quotes, copy the source string’s text properties too, since no
substring lengths have changed.
Perform xref searches without visiting unopened files
* lisp/progmodes/xref.el (xref-collect-references): Instead of
calling `semantic-symref-find-references-by-name', use
`semantic-symref-instantiate' and `semantic-symref-perform-search'
directly. Ask for `line-and-text' results (bug#23223).
(xref-collect-matches): Include the line text in the "hit"
structure.
(xref--convert-hits): New function, split off from
`xref-collect-references' and `xref-collect-matches', to convert
"hits" to xref instance list. Create a temporary buffer here, to
use it for post-processing all hit lines.
(xref--collect-matches): Use a different approach for non-visited
files. Insert the line text into the temp buffer, apply the
file's major mode the best we can without reading its whole
contents, syntax-propertize, and search in the result.
(xref--collect-matches-1): Extract, to handle the common logic
between two cases.
(xref--find-buffer-visiting): New function, a wrapper around
`find-buffer-visiting' to amortize its cost.
* lisp/cedet/semantic/symref/idutils.el
(semantic-symref-idutils--line-re): New constant.
(semantic-symref-parse-tool-output-one-line): Support result type
`line-and-text'.
Paul Eggert [Tue, 12 Apr 2016 15:47:15 +0000 (08:47 -0700)]
Improve time zone documentation
* doc/lispref/os.texi (Time Zone Rules):
New section, mostly with material moved here from other sections.
* doc/emacs/cmdargs.texi (General Variables):
* doc/lispref/os.texi (Time Conversion, Time Parsing):
Xref new section.
* etc/NEWS, etc/PROBLEMS:
* lisp/org/org.el (org-timestamp-format):
* src/editfns.c (Fformat_time_string, Fdecode_time)
(Fencode_time, Fcurrent_time_string, Fcurrent_time_zone)
(Fset_time_zone_rule):
When documenting time zone rule strings, mention the TZ
environment variable in preference to mentioning the
sort-of-internal function set-time-zone-rule.
Paul Eggert [Mon, 11 Apr 2016 16:02:00 +0000 (09:02 -0700)]
Sync with gnulib
This is for picky compilers whose stdint.h fails our C11 tests.
Problem reported for clang by Philipp Stephani (Bug#23261).
This incorporates:
2016-04-11 stdint: port to strict C11 left shift
* doc/misc/texinfo.tex, lib/stdint.in.h: Copy from gnulib.
Leo Liu [Mon, 11 Apr 2016 12:19:38 +0000 (20:19 +0800)]
Fix last change on 2016-01-02
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Move
`cl-errs-re' before `lisp--el-match-keyword'; don't use `prepend'
which highlights `cl-errs-re' even in comments or strings.
Paul Eggert [Mon, 11 Apr 2016 05:47:03 +0000 (22:47 -0700)]
Port run-prolog EMACS to SWI-Prolog 7.2.3
* lisp/progmodes/prolog.el (prolog-ensure-process):
Work around incompatibility of SWI-Prolog 7.2.3 and earlier
with the new way of dealing with the EMACS and INSIDE_EMACS
environment variables.
Eli Zaretskii [Sun, 10 Apr 2016 16:50:39 +0000 (19:50 +0300)]
Avoid crashes due to unreasonably large or small text scaling
* lisp/face-remap.el (text-scale-min-amount)
(text-scale-max-amount): New functions.
(text-scale-set, text-scale-increase): Use them to limit the text
scaling to a reasonable range of values. (Bug#23259)
Eli Zaretskii [Sun, 10 Apr 2016 16:04:33 +0000 (19:04 +0300)]
Improve handling of non-ASCII characters in Git log messages
* lisp/vc/vc-git.el (vc-git-commits-coding-system): Now a defcustom.
(vc-git-log-output-coding-system): New defcustom.
(vc-git-print-log, vc-git-command, vc-git--call): Use
'vc-git-log-output-coding-system' for reading stuff from Git.
Don't override values of 'coding-system-for-read/write' if they
are bound by caller -- this allows the user to force an encoding
via "C-x RET c".
(vc-git-checkin): On MS-Windows, pass the log message via a
temporary file, to work around the limitations on passing
non-ASCII characters via command-line arguments. Force using the
'locale-coding-system' for Git command-line arguments. This fixes
problems with non-ASCII commit log messages on MS-Windows.
(Bug#23076)
* etc/NEWS: Mention the new vc-git related defcustoms.
* src/xwidget.c (x_draw_xwidget_glyph_string): Use window_box
instead of calculating the clipping borders manually. Suggested
by YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>.
Eli Zaretskii [Sat, 9 Apr 2016 09:30:59 +0000 (12:30 +0300)]
Improve Lisp-level documentation of tooltips
* doc/lispref/display.texi (Tooltips): New section. (Bug#23246)
(Display): Update the chapter menu.
* doc/lispref/text.texi (Special Properties): Make the "tooltip"
index entry more concrete. Change the cross-reference to point to
"Tooltips" in the ELisp manual.
* doc/lispref/elisp.texi (Top): Update the master menu.
* doc/emacs/frames.texi (Tooltips): Include more customization
variables. Add a cross-reference to the ELisp manual.
Paul Eggert [Fri, 8 Apr 2016 20:39:17 +0000 (13:39 -0700)]
Comint and compile no longer set EMACS
This mostly restores the change that I reverted on March 23,
fixing most of Bug#20202. The only part of the change that is
still reverted is the change to M-x term, where compatibility with
current Bash constrains us from moving too quickly (Bug#20484).
Problem reported by Phillip Lord in: http://bugs.gnu.org/20484#108
* etc/NEWS: Document this.
* lisp/comint.el (comint-exec-1):
* lisp/net/tramp-sh.el (tramp-remote-process-environment):
* lisp/progmodes/compile.el (compilation-start):
Don’t set EMACS=t in the subsidiary process.
Eli Zaretskii [Fri, 8 Apr 2016 13:54:18 +0000 (16:54 +0300)]
Allow to customize names of executables used by grep.el
* lisp/progmodes/grep.el (grep-find-program): Renamed from
'find-program', which was a variable. All uses changed.
(grep-xargs-program): Renamed from 'xargs-program', which was a
variable. All uses changed.
(grep-program): Now a defcustom rather than a simple variable.
(Bug#23219)
* lisp/play/studly.el (studlify-region): Call
'forward-word-strictly' and 'backward-word-strictly' instead of
'forward-word' and 'backward-word'. (Bug#19940)
Paul Eggert [Thu, 7 Apr 2016 23:52:01 +0000 (16:52 -0700)]
Don’t recommend obsolete EMACS env var
* doc/misc/efaq.texi (Escape sequences in shell output):
Remove long-obsolete (and now-confusing) notes about
the EMACS environment variable in Emacs 21.1 and earlier.
* doc/misc/efaq.texi (^M in the shell buffer):
* etc/PROBLEMS:
Remove obsolescent recommendation to consult the EMACS environment
variable.
* lisp/progmodes/project.el (project-roots): Implement for the
`transient' project type (bug#23224).
(project-current): Instead of signaling an error, return a
transient project instance rooted in the chosen directory.
Paul Eggert [Wed, 6 Apr 2016 08:22:00 +0000 (01:22 -0700)]
Fix stability confusion in sort-tests
Problem reported by Philipp Stephani (Bug#23205).
* test/automated/sort-tests.el:
(sort-tests--insert-words-sort-and-compare):
Don’t assume that reversing a sorted list is the same
as sorting with the reverse predicate. This is not true
for stable sorts when items compare equal.
Paul Eggert [Tue, 5 Apr 2016 20:58:57 +0000 (13:58 -0700)]
Avoid describe-key error with lambdas
Problem reported by Sho Takemori (Bug#22716).
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(xref-mode-local-overload): Use function-overload-p instead
of assuming the argument is a symbol.
Paul Eggert [Mon, 4 Apr 2016 06:12:04 +0000 (23:12 -0700)]
Sync with gnulib
This incorporates:
2016-04-03 stdint: detect good enough pre-C++11 stdint.h in C++ mode
2016-04-01 stddef: support configuring with g++
* doc/misc/texinfo.tex, lib/stddef.in.h, m4/stdint.m4:
Copy from gnulib.
Paul Eggert [Sun, 3 Apr 2016 22:27:21 +0000 (15:27 -0700)]
Fix doc for Universal Time
* doc/lispref/os.texi (Time of Day, Time Conversion):
Be more careful about distinguishing UTC (which is not valid for
pre-1961 time stamps) and UT (which is).
(Time Parsing): Remove stray obsolete paragraph about a
UNIVERSAL argument for ‘format-time-string’.
Paul Eggert [Sun, 3 Apr 2016 06:43:44 +0000 (23:43 -0700)]
More format-time-string change fixups
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/org/org.el (org-timestamp-format):
Fix doc to match new format-time-string behavior.
* lisp/org/ox-icalendar.el (org-icalendar-convert-timestamp):
Use (not (not X)) to treat non-nil values of utc arg as UTC.
Eli Zaretskii [Sat, 2 Apr 2016 11:25:47 +0000 (14:25 +0300)]
Adapt calls to 'format-time-string' to changes in Emacs 25
* lisp/vc/pcvs-info.el (cvs-fileinfo-from-entries): Use t as the
last argument to format-time-string. (Bug#23128)
* lisp/gnus/gmm-utils.el (gmm-format-time-string): Use t as the
last argument to format-time-string, when the TZ argument is not a
number, per the doc string.
Eli Zaretskii [Sat, 2 Apr 2016 09:25:15 +0000 (12:25 +0300)]
Improve vc-diff with Git backend
* lisp/vc/vc-git.el (vc-git-command): Don't override
coding-system-for-read/write if they are already bound.
Suggested by joaotavora@gmail.com (João Távora). (Bug#20892)
(vc-git-print-log): Don't override coding-system-for-read if it's
already bound.
(js--continued-expression-p): Special-case unary plus and minus
* lisp/progmodes/js.el (js--continued-expression-p): Make an
effort to recognize unary plus and minus, in the contexts where
they make sense (https://github.com/mooz/js2-mode/issues/322).
Alan Mackenzie [Fri, 1 Apr 2016 12:50:14 +0000 (12:50 +0000)]
Prevent C++ Mode wrongly fontifying some identifiers near templates as types
This fixes debbugs #7917.
* lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id): Accept 'maybe
(from c-forward-type) as sufficient to record an id. Record type id as well
as ref ids.
(c-forward-name): Bind c-last-identifier-range around the call to
c-forward-<>-arglist to prevent it getting corrupted. Don't automatically
assume an identifier is a type when a template ">" is followed by a "(".
(c-forward-type): Don't automatically assume an identifier is a type when a
template ">" is followed by a "(".
* lisp/progmodes/cc-fonts.el (c-font-lock-<>-arglists): Don't fontify an
identifier as a type when its associated ">" is followed by a "(".
Eli Zaretskii [Fri, 1 Apr 2016 09:47:29 +0000 (12:47 +0300)]
Avoid crashes due to insanely large columns in tabulated-list-format
* src/xdisp.c (append_stretch_glyph, produce_xwidget_glyph)
(produce_image_glyph): Limit the pixel width of the produced glyph
to SHRT_MAX. (Bug#23178)
(append_composite_glyph, append_glyph, append_glyphless_glyph):
Add assertions to verify that the pixel width of the glyph will
never overflow a 'short'.
* src/term.c (append_composite_glyph): Add assertion to verify
that the pixel width of the glyph will never overflow a 'short'.
Michael Albinus [Thu, 31 Mar 2016 09:45:45 +0000 (11:45 +0200)]
Fix OS X specific settings in tramp-tests
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it.
* lisp/net/tramp.el (tramp-get-local-locale): New defun.
* test/automated/tramp-tests.el (tramp--test-darwin-p): Remove.
(tramp--test-utf8): Improve settings of coding systems.
Do not use `tramp--test-darwin-p' anymore. (Bug#22145)
Eli Zaretskii [Tue, 29 Mar 2016 17:38:54 +0000 (20:38 +0300)]
Fix rare problems with echo-area display and multiple frames
* src/xdisp.c (redisplay_window): Bind inhibit-redisplay non-nil
around the call to x_consider_frame_title, to prevent
resize_mini_window from undoing echo-area display. (Bug#23124)
Alan Mackenzie [Tue, 29 Mar 2016 09:53:12 +0000 (09:53 +0000)]
In M-%, avoid making buffer-local binding of text-property-default-nonsticky
This would happen when that variable already has a buffer local binding. Such
a binding would not be seen by read-from-minibuffer. This fixes bug #23127.
* lisp/replace.el (query-replace-read-from): Move the binding of
text-property-default-nonsticky to inside of a new with-current-buffer buffer
form with the minibuffer as argument.
Dmitry Gutov [Mon, 28 Mar 2016 00:51:21 +0000 (03:51 +0300)]
Remove prog-indentation-context
* lisp/progmodes/prog-mode.el: (prog-indentation-context)
(prog-first-column, prog-widen): Remove, as discussed in
http://lists.gnu.org/archive/html/emacs-devel/2016-03/msg01425.html.
* doc/lispref/text.texi (Mode-Specific Indent): Remove references
to them.
* etc/NEWS: Ditto.
* lisp/progmodes/python.el: (prog-widen, prog-first-column):
Remove the compatibility aliases and all uses.
Stephen Berman [Sat, 26 Mar 2016 22:14:50 +0000 (23:14 +0100)]
Fix todo-mode category movement
* lisp/calendar/todo-mode.el (todo-move-category): Use moved
category's existing categories sexp instead of invoking
todo-update-categories-sexp in file moved to, in order to take
archived items into account. If the moved category has archived
items, handle the source archive buffer properly. Remove
superfluous code.