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.
Martin Rudalics [Fri, 4 Mar 2016 07:37:53 +0000 (08:37 +0100)]
Fix previous fix of enlarge-/shrink-window
* lisp/window.el (enlarge-window, shrink-window): Consistently
signal user-error instead of error. Resize minibuffer window by
delta lines instead of pixels. When a window cannot be resized,
signal an error only when this function was invoked by a command
in the enlarge-/shrink-window group (this restores the behavior
before the fix of bug#22723 for the non-interactive case).
Alan Third [Wed, 2 Mar 2016 17:21:24 +0000 (17:21 +0000)]
Add the missing test case for the previous patch
lisp/dabbrev.el (dabbrev--substitute-expansion): Return EXPANSION after
any processing.
lisp/dabbrev.el (dabbrev-expand): Set EXPANSION to the return value of
DABBREV--SUBSTITUTE-EXPANSION.
test/automated/dabbrev-tests.el (dabbrev-expand-test): Test for bug#1948.
Alan Third [Wed, 2 Mar 2016 17:20:47 +0000 (17:20 +0000)]
Use the correct dabbrev expansion
lisp/dabbrev.el (dabbrev--substitute-expansion): Return EXPANSION after
any processing.
lisp/dabbrev.el (dabbrev-expand): Set EXPANSION to the return value of
DABBREV--SUBSTITUTE-EXPANSION.
test/automated/dabbrev-tests.el (dabbrev-expand-test): Test for bug#1948.
Eli Zaretskii [Tue, 1 Mar 2016 16:41:04 +0000 (18:41 +0200)]
Fix reordering of bidi text in an isolate inside an override
* src/bidi.c (bidi_resolve_explicit): Override the orig_type value
of FSI with either LRI or RLI, as determined by the first strong
directional character in the isolate. This prevents failure to
isolate when the FSI...PDI text is inside a directional override.
(Bug#22786)
Alan Mackenzie [Tue, 1 Mar 2016 15:01:46 +0000 (15:01 +0000)]
Document c-guess-basic-syntax in the CC Mode manual.
* doc/misc/cc-mode.texi (Syntactic Analysis): Document the function, adding
pxrefs to Custom Line-Up and Other Indentation.
(Custom Line-Up): Add a note on using c-guess-basic-syntax with a pxref to
Syntactic Analysis.
Eli Zaretskii [Thu, 25 Feb 2016 19:59:57 +0000 (21:59 +0200)]
Remove unneeded workaround in xftfont.c
* src/xftfont.c (xftfont_open): Remove "dirty workaround" for
XftTextExtents8 behavior, as it is no longer needed. Suggested by
Fangwen Yu <yynyygy@gmail.com>. (Bug#22383)
Stefan Monnier [Wed, 24 Feb 2016 20:50:54 +0000 (15:50 -0500)]
* src/keyboard.c: Don't inadvertently set immediate_echo (bug#22581)
* src/keyboard.c (read_key_sequence): Don't inadvertently set
immediate_echo when we don't want any echo-keystrokes.
(echo_keystrokes_p): Move earlier.