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.
Eli Zaretskii [Sat, 26 Mar 2016 08:52:12 +0000 (11:52 +0300)]
Ignore non-nil. non-cons values of unread-command-events
* src/keyboard.c (requeued_events_pending_p, read_char)
(Finput_pending_p): Use CONSP instead of !NILP to see if there are
unread command events to be processed. (Bug#22976)
Eli Zaretskii [Sat, 26 Mar 2016 07:17:12 +0000 (10:17 +0300)]
Improve documentatuon of 'truncate-partial-width-windows'
* src/xdisp.c (syms_of_xdisp) <truncate-partial-width-windows>:
Clarify in the doc string how the width of partial-width windows
is computed for the purposes of truncation decision. (Bug#4338)
* doc/emacs/windows.texi (Split Window): Clarify how the width of
windows is calculated for the purposes of truncation decision.
* doc/emacs/display.texi (Line Truncation): Remove a redundant
index entry.
Eli Zaretskii [Fri, 25 Mar 2016 14:18:21 +0000 (17:18 +0300)]
Fix 'dired-goto-file' in Dired buffers produced by find-dired
* lisp/dired.el (dired-goto-file): Try looking for the file as a
relative name with leading sub-directories, before looking for the
basename alone. (Bug#23089)
Nicolas Petton [Fri, 25 Mar 2016 14:09:04 +0000 (15:09 +0100)]
Fix map-put and map-delete for alists (Bug#23105)
* lisp/emacs-lisp/map.el (map-put): Do not bind the evaluated place
expression to a new symbol.
* test/lisp/emacs-lisp/map-tests.el: Add a regression test.
Eli Zaretskii [Fri, 25 Mar 2016 10:37:58 +0000 (13:37 +0300)]
Minor copyedits of documentation for temporary displays
* doc/emacs/windows.texi (Temporary Displays): Improve indexing.
Minor changes in wording.
(Window Choice, Displaying Buffers, Pop Up Window): Disambiguate
index entries for 'display-buffer'.
* etc/NEWS: Minor rewording of the entry about temporary displays.
Philipp Stephani [Fri, 25 Mar 2016 10:17:38 +0000 (13:17 +0300)]
Add customization option for using UTF-8 coordinates in xt-mouse
* lisp/xt-mouse.el (xterm-mouse-utf-8): New customization option.
(xterm-mouse--read-coordinate): New function to replace
`xterm-mouse--read-utf8-char'; uses UTF-8 only if enabled.
(xterm-mouse--read-number-from-terminal): Adapt to new name.
(xterm-mouse-tracking-enable-sequence)
(xterm-mouse-tracking-disable-sequence): Replace constants with
functions, mark constants as obsolete.
(xterm-mouse--tracking-sequence): New helper function.
(turn-on-xterm-mouse-tracking-on-terminal): Use new functions;
enable UTF-8 only if customization option says so; store UTF-8
flag in terminal parameter. (Bug#23009)
* test/automated/xt-mouse-tests.el: Add tests for xt-mouse.el.
Eli Zaretskii [Fri, 25 Mar 2016 10:02:20 +0000 (13:02 +0300)]
Minor doc string fixes in replace.el
* lisp/replace.el (query-replace, query-replace-regexp)
(query-replace-regexp-eval, map-query-replace-regexp)
(replace-string, replace-regexp): Clarify in doc strings that
these commands operate from point to the end of the buffer's
accessible portion. (Bug#23067)
Eli Zaretskii [Fri, 25 Mar 2016 07:45:39 +0000 (10:45 +0300)]
Fix splash screen display at startup
* src/frame.c (DEFAULT_ROWS): Enlarge to 36, so that the initial
window displayed by "emacs -q" has enough space to show the whole
text even if it includes 2 lines talking about recovering crashes
sessions. (Bug#23074)
* lisp/startup.el (use-fancy-splash-screens-p): Fix off-by-one
error when computing the window-height from frame-height.
Martin Rudalics [Fri, 25 Mar 2016 07:30:23 +0000 (08:30 +0100)]
Describe temporary displays in Emacs manual
* doc/emacs/emacs.texi (Temporary Displays): New subsubsection.
* doc/emacs/windows.texi (Window Choice): Minor fixes.
(Temporary Displays): New subsubsection describing display of
temporary buffers and `temp-buffer-resize-mode'.
Paul Eggert [Thu, 24 Mar 2016 23:48:46 +0000 (16:48 -0700)]
Avoid stray As next to IDLW icons
* lisp/progmodes/idlw-toolbar.el (idlwave-toolbar-add-everywhere):
Use "" for empty labels, not "a", as the latter now displays stray
"A"s (Bug#18997).
Paul Eggert [Thu, 24 Mar 2016 23:46:28 +0000 (16:46 -0700)]
Avoid GTK 3 crash with icons and masks
Problem reported by Mosè Giordano (Bug#18997).
* src/gtkutil.c (xg_get_pixbuf_from_pixmap): Remove.
(xg_get_pixbuf_from_pix_and_mask): Do not use
xg_get_pixbuf_from_pixmap, as it is poorly documented. Instead,
invoke XGetPixel directly. This is slow but speed is not
important here. Also, fail for unusual situations (not TrueColor,
or images that are not 8 bits per sample) instead of displaying
junk or crashing.
Eli Zaretskii [Thu, 24 Mar 2016 18:52:45 +0000 (20:52 +0200)]
Define make_save_ptr_ptr unconditionally
* src/alloc.c (make_save_ptr_ptr): Remove the !(defined
USE_X_TOOLKIT || defined USE_GTK) conditional. Reported by
Philipp Stephani <phst@google.com>. (Bug#23101)
Eli Zaretskii [Thu, 24 Mar 2016 16:30:41 +0000 (18:30 +0200)]
Improve font selection by family on MS-Windows
* src/w32font.c (w32font_list_internal): Allow 'ascii-0' charset,
in addition to 'iso10646-1', 'unicode-bmp', and 'unicode-sip'.
This avoids rejecting many font families whose members are shown
by 'font-family-list', in particular 'courier' requested by
info.el. Without this change, many values of ':family' attribute
of a face have no effect on MS-Windows, because they are rejected
due to bogus mismatch of the charset.
Paul Eggert [Wed, 23 Mar 2016 22:07:56 +0000 (15:07 -0700)]
Comint, term, and compile now set EMACS
This fixes directory tracking in ansi-term, at the expense of
breaking some usages of 'configure'. Setting EMACS is meant to be
a somewhat temporary measure, until Bash 4.4 comes out and is
common. (Bug#20484).
* 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):
* lisp/term.el (term-exec-1):
Go back to setting the EMACS environment variable, for backward
compatibility to Bash 4.3 and earlier.
Paul Eggert [Wed, 23 Mar 2016 21:49:26 +0000 (14:49 -0700)]
Ignore more merges when generating ChangeLog
* build-aux/gitlog-to-emacslog: Ignore all merges from gnu.org,
not merely those from master and emacs-NN. The ChangeLog entries
they generate are not that useful.
Paul Eggert [Wed, 23 Mar 2016 18:17:37 +0000 (11:17 -0700)]
Sync with gnulib
This incorporates:
2016-03-22 gitlog-to-changelog: suppress ignored chatter
2016-03-21 sys_select: port to new Cygwin
* build-aux/gitlog-to-changelog, doc/misc/texinfo.tex:
* lib/sys_select.in.h: Copy from gnulib.
Paul Eggert [Wed, 23 Mar 2016 07:07:14 +0000 (00:07 -0700)]
Resurrect GNUS-NEWS autogeneration
* doc/misc/gnus-coding.texi (Gnus Maintenance Guide): Update
GNUS-NEWS section to match current file locations and procedure.
* etc/GNUS-NEWS: Regenerate by using new procedure.
* lisp/Makefile.in (update-gnus-news): New rule, containing a
procedure for building GNUS-NEWS. The old procedure got lost
somehow when Gnus was merged into Emacs.
Anders Lindgren [Tue, 22 Mar 2016 19:18:33 +0000 (20:18 +0100)]
Make `toggle-frame-maximized' respect the dock on OS X (bug#22988).
* src/nsterm.m (ns_screen_margins): New function.
(ns_screen_margins_ignoring_hidden_dock): New function.
(ns_menu_bar_height): Reimplement in terms of `ns_screen_margins'.
([EmacsWindow zoom:]): Take all screen margins (except those
originating from a hidden dock) into account.
Eli Zaretskii [Tue, 22 Mar 2016 18:16:42 +0000 (20:16 +0200)]
Fix bug in displaying header line with a box face
* src/xdisp.c (get_next_display_element): Handle the case when a
display string acquires the box face from an underlying string,
not from the buffer. (Bug#23091)
Kaushal Modi [Mon, 21 Mar 2016 23:28:27 +0000 (00:28 +0100)]
Fix an Isearch var to be a string (Bug#23038)
* isearch.el (isearch--describe-regexp-mode): The `description' var
needs to always be a string. Add the missing default case for the
cond form that ensures that.
Before this bug fix, for the events when `regexp-function' and
`search-default-mode' both were nil, `description' also stayed nil. So
when `space-before' was non-nil, the "non-string" `description'
(with a value of nil) got passed as an argument to
`replace-regexp-in-string' (where a string was expected). That caused
the error described in Bug#23038.
Fix <p> and <div> newlines with or without <li> in shr
* lisp/net/shr.el (shr-ensure-newline): Respect that we're in
a <li>, if we are, and don't insert newlines there.
(shr-ensure-paragraph): When mixing newlines and paragraph
ensurements, don't insert too many blank lines.
(shr-tag-div): A <div> shouldn't introduce a paragraph, but a
new line.
(cherry picked from commit 292921facaff2f02ac4e8602c1f7ecbdcfe7ef45)
Eli Zaretskii [Sat, 19 Mar 2016 11:05:55 +0000 (13:05 +0200)]
Adjudicate review comments in abbrevs.texi
* doc/lispref/abbrevs.texi (Abbrev Files, Abbrev Expansion):
* doc/emacs/abbrevs.texi (Dabbrev Customization): State the
default values of variables. Suggested by Steve Byrne
<sbb@penguinis.org>. (Bug#23016)
* admin/release-process (Check manuals): Mark files reviewed by
Steve Byrne.
Dmitry Gutov [Fri, 18 Mar 2016 22:37:09 +0000 (00:37 +0200)]
Fixup the "normal" matcher; highlight global var symbols, too
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
operator name symbols with the "normal" matcher (it actually
needed updating). Highlight global variable symbols, too.
Marcin Borkowski [Mon, 14 Mar 2016 10:15:10 +0000 (11:15 +0100)]
Honor prefix arg in doc-view-next-line-or-next-page
* lisp/doc-view.el (doc-view-next-line-or-next-page): Take the
prefix argument into consideration when continuous scrolling is
not in effect (i.e., by default) (bug#19559).
Paul Eggert [Fri, 18 Mar 2016 15:42:15 +0000 (08:42 -0700)]
Port to strict C99 offsetof
* src/bidi.c (bidi_copy_it):
* src/lisp.h (CHAR_TABLE_EXTRA_SLOTS):
Use only a single identifier as the second argument of offsetof.
Found by using clang -pedantic.
Paul Eggert [Fri, 18 Mar 2016 15:36:59 +0000 (08:36 -0700)]
Port to GTK with strict C11 compiler
* src/gtkutil.c (xg_create_frame_widgets, xg_toggle_notify_cb):
Cast from function type to void * where the C standard requires this.
This works around a problem in the prototypes for
g_signal_handler_find and g_signal_handlers_block_by_func, which
use gpointer instead of GCallback. Found by using gcc -pedantic.
Paul Eggert [Fri, 18 Mar 2016 06:45:02 +0000 (23:45 -0700)]
Port to GTK with strict C99 compiler
* src/emacsgtkfixed.c: Use workaround for GNOME bug 683906 only
in glib 2.35.6 and earlier, since the bug is fixed in 2.35.7.
* src/emacsgtkfixed.c (EmacsFixedPrivate):
* src/emacsgtkfixed.h (EmacsFixedClass):
Remove duplicate typedef, which strict C99 does not allow (Bug#23003).
Anders Lindgren [Thu, 17 Mar 2016 20:07:04 +0000 (21:07 +0100)]
Avoid screen artifacts with new OS X visible bell after scrolling
* src/nsterm.m (EmacsBell): Save NSView when displaying the
visible bell and set `needsDisplay' when removed.
(hide_bell): Trace.
(ns_copy_bits): Trace.
Dmitry Gutov [Wed, 16 Mar 2016 13:58:21 +0000 (15:58 +0200)]
Support safe navigation operator in non-SMIE indentation code
* lisp/progmodes/ruby-mode.el (ruby-calculate-indent):
Support safe navigation operator in non-SMIE indentation code.
Cherry-picked from
https://github.com/ruby/ruby/commit/68e16ddd7961b86e5013e62ae2954e88638de058.
Move xsd:base64Binary decoding fix to debbugs.el 0.9.1
* lisp/net/soap-client.el (soap-encode-xs-basic-type): Do not
assume xsd:base64Binary values are UTF-8 strings.
(soap-decode-xs-basic-type): Likewise.
(soap-invoke): Document xsd:base64Binary handling.
Paul Eggert [Tue, 15 Mar 2016 20:47:47 +0000 (13:47 -0700)]
Port to clang 3.7.0 on x86-64
* configure.ac: Use AS_IF so that gl_WARN_ADD’s prerequisites are
not done conditionally. This helps clang, which needs
-Wunknown-warning-option later when configured with warnings.
* src/editfns.c (invalid_time): Now _Noreturn, since clang isn’t
smart enough to figure this out on its own if warnings are enabled.
(lisp_time_struct): Redo for clarity, and to pacify clang.
* src/xfns.c (x_real_pos_and_offsets) [USE_XCB]: Don’t use
uninitialized locals. This avoids undefined behavior and pacifies
clang.
Paul Eggert [Tue, 15 Mar 2016 20:20:29 +0000 (13:20 -0700)]
Sync with gnulib
This incorporates:
2016-03-15 time_rz: port to clang -Wunused-const-variable
2016-03-15 select: port more to Intel 2016.1.150 compiler
* lib/sys_select.in.h, lib/time_rz.c: Copy from gnulib.