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.
Paul Eggert [Tue, 15 Mar 2016 00:36:23 +0000 (17:36 -0700)]
ASCII-only etc/NEWS etc.
* etc/NEWS, nextstep/README: Revert the recently-added curved
quotes, and stick to ASCII. This typically involves replacing
curved with straight quotes. Since etc/NEWS is viewed so often by
UTF-8-ignorant tools, rewrite its non-ASCII text to spell out
Unicode, e.g., replace ‘‒’ with ‘U+2012 (FIGURE DASH)’.
Alan Mackenzie [Mon, 14 Mar 2016 21:44:11 +0000 (21:44 +0000)]
Fix a cacheing bug, which led to inordinately slow c-beginning-of-defun.
* lisp/progmodes/cc-defs.el (c-self-bind-state-cache): New macro.
* lisp/progmodes/cc-engine.el (c-ssb-lit-begin): Always call c-parse-state
rather than just using the cache variable c-state-cache.
(c-syntactic-skip-backward): Invoke c-self-bind-state-cache to isolate calls
to c-parse-state from other uses of the parse state cache.
* lisp/progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Invoke
c-self-bind-state-cache around the processing, replacing flawed bindings of
c-state-cache.
Kaushal Modi [Mon, 14 Mar 2016 18:15:17 +0000 (20:15 +0200)]
Fix Isearch prompt when invoked with an argument
* lisp/isearch.el (isearch--describe-regexp-mode): With
`search-default-mode' set to nil, if user does C-u C-s, the minibuffer
now displays "Regexp I-search: " again. But if the user has set
`search-default-mode' to t, and then does C-s, the minibuffer now
displays "I-search: " because the default search mode is now regexp
mode. Comments have been added to explain the priority of conditions
in the `cond' form. (Bug#22991)
Paul Eggert [Mon, 14 Mar 2016 16:30:01 +0000 (09:30 -0700)]
Curved quotes in etc/NEWS etc.
* etc/NEWS, nextstep/README: Prefer curved quotes in the
recently-changed text documentation. See:
http://lists.gnu.org/archive/html/emacs-devel/2016-03/msg00860.html
Paul Eggert [Mon, 14 Mar 2016 15:40:08 +0000 (08:40 -0700)]
Fix some single quotes in documentation
* doc/emacs/anti.texi (Antinews): Avoid confusion in info and PDF
when documenting quoting styles.
* etc/NEWS, nextstep/README: In these plain text files, quote
'like this' consistently, rather than also (sometimes) ‘like this’
or (more often) `like this'.
Phillip Lord [Sat, 12 Mar 2016 22:26:20 +0000 (22:26 +0000)]
Simplify "Visit New File" to "New File"
* doc/emacs/files.texi,lisp/menu-bar.el (menu-bar-file-menu),
lisp/startup.el(normal-mouse-start-screen,
normal-no-mouse-startup-screen): Change label "Visit New File" to "New
File".
Eli Zaretskii [Sat, 12 Mar 2016 15:51:45 +0000 (17:51 +0200)]
Import new data files from Unicode 9.0.0beta
* admin/unidata/UnicodeData.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/BidiBrackets.txt: Update from Unicode 9.0.0beta.
* admin/unidata/unidata-gen.el (unidata-gen-files): Bind
'coding-system-for-read' to 'utf-8, as various Unicode data files
now actually use non-ASCII characters.
(unidata-setup-list, unidata-get-name): Support the new Tangut
Ideographs block.
* lisp/international/characters.el (standard-case-table): Add new
characters from Unicode 9.0.0.
(standard-category-table): Add Arabic block u+08A0..u+08FF. Add
Cyrillic Extended-C block.
(char-width-table): Update ranges per Unicode 9.0.0.
* lisp/international/fontset.el (script-representative-chars): Add
new scripts defined by Unicode 9.0.0.
(otf-script-alist): Add new OTF script tags.
* lisp/international/mule-cmds.el (ucs-names): Update ranges per
Unicode 9.0.0 additions.
Eli Zaretskii [Sat, 12 Mar 2016 09:51:03 +0000 (11:51 +0200)]
Avoid crashes at startup on systems that CANNOT_DUMP
* src/xdisp.c (syms_of_xdisp) <redisplay--inhibit-bidi>: New
boolean variable.
(init_iterator, reseat_to_string)
(Fcurrent_bidi_paragraph_direction)
(Fbidi_find_overridden_directionality): Use
redisplay--inhibit-bidi instead of purify-flag, to determine when
it's safe to reorder bidirectional text.
* lisp/loadup.el (redisplay--inhibit-bidi): Set to t at the
beginning of the file. Reset to nil when charprop.el is
successfully loaded, or when we are going to dump, whichever
happens last. (Bug#22975)
Dmitry Gutov [Fri, 11 Mar 2016 22:18:42 +0000 (00:18 +0200)]
Support Ruby 2.3.0's safe navigation operator
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Tokenize '&.' as '.'.
(ruby-smie--implicit-semi-p): Check for possible '&' before '.'.
* test/indent/ruby.rb: Add an example using safe navigation
operator. Fix a syntax error in existing example.
Eli Zaretskii [Fri, 11 Mar 2016 10:50:55 +0000 (12:50 +0200)]
Update admin/notes/unicode
* admin/notes/unicode: Update the list of files from the UCD we
are using. Mention the possible need to change 'ucs-names' when
importing a new version of the Unicode Standard.
Ken Raeburn [Wed, 9 Mar 2016 03:17:16 +0000 (22:17 -0500)]
Don't use XRANDR 1.3 extensions if the server doesn't support them.
* src/xterm.h (struct x_display_info): Add fields to save XRANDR
version number.
* src/xfns.c (x_get_monitor_attributes): Save the version numbers
after querying the X server.
(x_get_monitor_attributes_xrandr): Don't use XRRGetOutputPrimary or
XRRGetScreenResourcesCurrent if the server doesn't support at least
RANDR version 1.3. Conditionalize the code blocks on compiling
against library version 1.3 or better, rather than feature tests for
each function.
* configure.ac: Stop testing for those two functions.
Paul Eggert [Thu, 10 Mar 2016 15:55:38 +0000 (07:55 -0800)]
Sync with gnulib
This incorporates:
2016-03-08 intprops: make .h file license match module
2016-03-08 acl: fix missing return on Cygwin
2016-03-05 extern-inline: port to PGI CC
* doc/misc/texinfo.tex, lib/intprops.h, lib/set-permissions.c:
* m4/extern-inline.m4:
Copy from gnulib.
Paul Eggert [Thu, 10 Mar 2016 15:34:52 +0000 (07:34 -0800)]
Rework C source files to avoid ^(
Work around Bug#22884 by rewording comments and strings to avoid ‘(’
at the start of a line unless it starts a function. This change
is a short-term hack; in the longer run we plan to fix cc-mode’s
performance for C files that have ‘(’ at the start of a line in a
comment or string.
Dmitry Gutov [Thu, 10 Mar 2016 12:35:45 +0000 (14:35 +0200)]
Indent methods with keyword names correctly
* lisp/progmodes/ruby-mode.el (ruby-smie--at-dot-call):
Rename to ruby-smie--before-method-name. Now also check if we're
after a 'def' keyword. Update both callers.
Dmitry Gutov [Thu, 10 Mar 2016 02:13:25 +0000 (04:13 +0200)]
Propertize character literals and special global variables differently
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize): Propertize
character literals and global variables with special names with
prefix and symbol syntax classes, for SMIE to tokenize them
together automatically.
(ruby-font-lock-keywords): Fix an old regression in highlighting
character literals.
Dmitry Gutov [Wed, 9 Mar 2016 14:43:51 +0000 (16:43 +0200)]
Propertize operator symbol names with symbol syntax class
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Do it here.
(ruby-font-lock-keywords): Instead of handling them here. Leave
highlighting them to the "normal" matcher, because now we can.
(ruby-smie--forward-token, ruby-smie--backward-token):
Likewise, don't special-case operator symbols anymore.
(ruby-smie--args-separator-p): Simplify the regexp, match operator
names with \s_.
(ruby-smie--implicit-semi-p): Handle the special cases of ? and =
at EOL the same way: check if the character has been assigned the
symbol syntax class by syntax-propertize.
Dmitry Gutov [Tue, 8 Mar 2016 19:16:54 +0000 (21:16 +0200)]
Stop recognizing :#{} as symbol in ruby-mode
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove
the weird part that recognized colon followed by interpolation
construct without quotes (e.g. ':#{abc}') as symbol, which is just a
syntax error in any modern version of Ruby. Fix nearby bug reference.
Dmitry Gutov [Tue, 8 Mar 2016 13:46:19 +0000 (15:46 +0200)]
Allow using the left shift operator without spaces on both sides
* lisp/progmodes/ruby-mode.el (ruby-singleton-class-p): Rename to
ruby-verify-heredoc, reverse the meaning of the return value, and
short-circuit if preceded by a symbol not separated by whitespace.
* test/automated/ruby-mode-tests.el (ruby-no-heredoc-left-shift)
(ruby-no-heredoc-class-self): New tests.
Andreas Schwab [Tue, 8 Mar 2016 20:32:52 +0000 (21:32 +0100)]
Properly handle unquoting in wdired (bug 22938)
The recorded old names are not quoted, don't unquote them.
* lisp/wdired.el (wdired-normalize-filename): Add argument
unquotep, only unquote if non-nil.
(wdired-get-filename): Don't unquote the old file name.
(wdired-get-previous-link): Always unquote.
Dmitry Gutov [Mon, 7 Mar 2016 00:58:49 +0000 (02:58 +0200)]
Guard against nested percent literals
* lisp/progmodes/ruby-mode.el
(ruby-syntax-propertize-percent-literal):
Don't check the syntax status.
(ruby-syntax-propertize): Check it here. And also guard against
being in a larger percent literal.
* test/automated/ruby-mode-tests.el
(ruby-no-nested-percent-literals): New test.
Dmitry Gutov [Sun, 6 Mar 2016 21:18:06 +0000 (23:18 +0200)]
Recognize iuwu-mod after an escaped newline
* lisp/progmodes/ruby-mode.el (ruby-smie--bosp): Check if the
newline is escaped.
(ruby-smie-rules): Indent iuwu-mod after an escaped newline
correctly.
Eli Zaretskii [Sun, 6 Mar 2016 16:14:46 +0000 (18:14 +0200)]
Speed up redisplay of binary files with long series of nulls
* src/bidi.c (bidi_resolve_weak): Avoid entering a loop searching
for a character needed for resolving the type of a series of BN
and ET characters, as required by rule W5 of UAX#9, if the results
of the resolution are known in advance, because we are at level
zero, and the previous strong character was L.
(bidi_resolve_neutral): Partially resurrect the optimization for a
long series of control characters in an otherwise strictly L2R
text.
(bidi_level_of_next_char): Don't enter the loop that searches for
a paragraph separator if the current character is already at base
embedding level. (Bug#22739)
Dmitry Gutov [Sun, 6 Mar 2016 00:40:49 +0000 (02:40 +0200)]
Remove the highlighting support for quoting 'like this' inside Lisp docstrings
Remove the highlighting support for quoting 'like this' inside
Lisp docstrings. This part of c4151ebe15479de4c2e511b068cdf9af6a4576cf seems to have been
unintentional, considering substitute-command-keys gives wrong
output for such usage.
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2)
(lisp-cl-font-lock-keywords-2): Do not highlight text between two
straight quotes as symbol.
Paul Eggert [Sat, 5 Mar 2016 19:30:51 +0000 (11:30 -0800)]
Restore leading space in movemail pop output
* lib-src/movemail.c (movemail_strftime) [WINDOWSNT]: New function.
(strftime) [WINDOWSNT]: New macro.
(mbx_delimit_begin): Go back to previous version of this code,
now that there’s a special-purpose WINDOWSNT implementation
that should do the right thing. That way, the output continues
to use leading space rather than leading zero for day of month.
Eli Zaretskii [Sat, 5 Mar 2016 10:57:06 +0000 (12:57 +0200)]
Fix mbox files produced by movemail on MS-Windows
* lib-src/movemail.c (mbx_delimit_begin): Use portable strftime
format specifiers, as at least the MS-Windows version of strftime
doesn't support %e and %T.