]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoPerform xref searches without visiting unopened files
Dmitry Gutov [Tue, 12 Apr 2016 18:08:22 +0000 (21:08 +0300)]
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'.

* lisp/cedet/semantic/symref/grep.el
(semantic-symref-grep--line-re)
(semantic-symref-parse-tool-output-one-line): Same.

* lisp/cedet/semantic/symref/cscope.el
(semantic-symref-cscope--line-re)
(semantic-symref-parse-tool-output-one-line): Same.

* lisp/cedet/semantic/symref/global.el
(semantic-symref-global--line-re)
(semantic-symref-parse-tool-output-one-line): Same.

8 years agoRevert "Prevent bootstrap autoload backup files"
Phillip Lord [Tue, 12 Apr 2016 17:00:50 +0000 (18:00 +0100)]
Revert "Prevent bootstrap autoload backup files"

This reverts commit c23c965bb9d0a4bcc1b6158833ff99aa20fd53e9.

8 years agoImprove time zone documentation
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.

8 years agoPrevent bootstrap autoload backup files
Phillip Lord [Fri, 8 Apr 2016 15:22:44 +0000 (16:22 +0100)]
Prevent bootstrap autoload backup files

 * lisp/emacs-lisp/autoload (autoload-find-generated-file): Suppress
   backups in newly created file.

  (autoload-ensure-default-file): Function split into two.
  (autoload-ensure-file-writeable): New function from split.

  (Bug#23203)

8 years agoDisable multicolor fonts on OS X since they are not supported on free systems
YAMAMOTO Mitsuharu [Mon, 11 Apr 2016 23:26:51 +0000 (08:26 +0900)]
Disable multicolor fonts on OS X since they are not supported on free systems

* src/macfont.m (macfont_list): Don't use color bitmap fonts.

8 years agoCapitalize “Universal Time” in documentation
Paul Eggert [Mon, 11 Apr 2016 22:15:23 +0000 (15:15 -0700)]
Capitalize “Universal Time” in documentation

It’s a proper noun.
* lisp/vc/add-log.el (add-log-time-zone-rule): Also, fix typo by
mentioning ‘format-time-string’ instead of ‘set-time-zone-rule’.

8 years agoDon't use 'find-program'
Eli Zaretskii [Mon, 11 Apr 2016 16:41:48 +0000 (19:41 +0300)]
Don't use 'find-program'

* lisp/progmodes/project.el (project-file-completion-table): Use
'grep-find-program', rather than the obsolete 'find-program'.

8 years agoSync with gnulib
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.

8 years agoFix last change on 2016-01-02
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.

8 years ago; Spelling fixes
Paul Eggert [Mon, 11 Apr 2016 06:54:33 +0000 (23:54 -0700)]
; Spelling fixes

8 years agoPort run-prolog EMACS to SWI-Prolog 7.2.3
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.

8 years agoAvoid crashes due to unreasonably large or small text scaling
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)

8 years agoImprove documentation of 'with-eval-after-load'
Eli Zaretskii [Sun, 10 Apr 2016 16:15:13 +0000 (19:15 +0300)]
Improve documentation of 'with-eval-after-load'

* lisp/subr.el (with-eval-after-load): Doc fix.  (Bug#23258)

8 years agoImprove handling of non-ASCII characters in Git log messages
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.

8 years agoRemove undefined behavior in OS X dumper.
Philipp Stephani [Thu, 31 Mar 2016 21:10:40 +0000 (23:10 +0200)]
Remove undefined behavior in OS X dumper.

Found by Address Sanitizer.

* src/unexmacosx.c (unexec_write): Use Mach virtual memory API to
avoid undefined behavior when reading arbitrary memory.

8 years agoFix clipping of xwidgets
Joakim Verona [Sat, 9 Apr 2016 12:04:54 +0000 (15:04 +0300)]
Fix clipping of xwidgets

* 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>.

8 years agoImprove Lisp-level documentation of tooltips
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.

8 years agoFaces names should not end in "-face".
Glenn Morris [Sat, 9 Apr 2016 00:59:21 +0000 (20:59 -0400)]
Faces names should not end in "-face".

* lisp/rect.el (rectangle-preview): Rename from rectangle-preview-face.
* lisp/vc/vc-hooks.el (vc-state-base): Rename from vc-state-base-face.

8 years ago* src/xsmfns.c (syms_of_xsmfns): Remove stray "s in doc strings.
Paul Eggert [Fri, 8 Apr 2016 23:29:59 +0000 (16:29 -0700)]
* src/xsmfns.c (syms_of_xsmfns): Remove stray "s in doc strings.

8 years agoComint and compile no longer set EMACS
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.

8 years ago* lisp/subr.el (read-key): Don't let the prompt linger (bug#22714)
Stefan Monnier [Fri, 8 Apr 2016 18:02:24 +0000 (14:02 -0400)]
* lisp/subr.el (read-key): Don't let the prompt linger (bug#22714)

8 years agoMerge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
Eli Zaretskii [Fri, 8 Apr 2016 13:55:34 +0000 (16:55 +0300)]
Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25

8 years agoAllow to customize names of executables used by grep.el
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)

8 years agoSet locale encoding to UTF-8 when run from OS X GUI.
Alan Third [Fri, 8 Apr 2016 13:52:55 +0000 (15:52 +0200)]
Set locale encoding to UTF-8 when run from OS X GUI.

* src/nsterm.m (ns_init_locale): Append .UTF-8 when setting LANG.

8 years agoAvoid signaling errors in 'M-n' at the 'C-x C-f' prompt
Eli Zaretskii [Fri, 8 Apr 2016 08:05:20 +0000 (11:05 +0300)]
Avoid signaling errors in 'M-n' at the 'C-x C-f' prompt

* lisp/ffap.el (ffap-guess-file-name-at-point): Ignore errors
while 'ffap-guesser' runs.  (Bug#23218)

8 years agoAvoid infinite loop in 'studlify-word'
Marcin Borkowski [Fri, 8 Apr 2016 07:57:21 +0000 (10:57 +0300)]
Avoid infinite loop in 'studlify-word'

* lisp/play/studly.el (studlify-region): Call
'forward-word-strictly' and 'backward-word-strictly' instead of
'forward-word' and 'backward-word'.  (Bug#19940)

8 years agoDon’t recommend obsolete EMACS env var
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.

8 years ago* lisp/emacs-lisp/package.el: Change from a few days ago needs seq.
Glenn Morris [Thu, 7 Apr 2016 20:26:55 +0000 (16:26 -0400)]
* lisp/emacs-lisp/package.el: Change from a few days ago needs seq.

; Warning 'foo' is not known to be defined is always a bug.

8 years ago* lisp/emacs-lisp/seq.el: Load cl-lib, not cl-extra.
Glenn Morris [Thu, 7 Apr 2016 20:24:25 +0000 (16:24 -0400)]
* lisp/emacs-lisp/seq.el: Load cl-lib, not cl-extra.

; The various components of cl-lib are an internal implementation detail.

8 years agoFix "Beginning of buffer" error in forward-page
Leo Liu [Thu, 7 Apr 2016 13:42:40 +0000 (21:42 +0800)]
Fix "Beginning of buffer" error in forward-page

* lisp/textmodes/page.el (forward-page): Check before move to prevent
  "Beginning of buffer" error.

8 years agoAdd a `transient' project type
Dmitry Gutov [Wed, 6 Apr 2016 23:02:13 +0000 (02:02 +0300)]
Add a `transient' project type

* 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.

8 years agoRevert "Backport HTTPS proxy fix"
Lars Magne Ingebrigtsen [Wed, 6 Apr 2016 16:36:18 +0000 (18:36 +0200)]
Revert "Backport HTTPS proxy fix"

This reverts commit 2d1a6054b161bd1055d4feb11c8c5ac95543f5db.

It's too late in the Emacs 25 release cycle to add things like this to
Emacs 25.1.  It's border line new feature.

8 years agoBackport HTTPS proxy fix
Tao Fang [Mon, 4 Apr 2016 20:21:21 +0000 (22:21 +0200)]
Backport HTTPS proxy fix

Cherry-picked from 3c623c26ae7d695746e05d8a2e16a67a6256b024

Backport:

8 years agoFix stability confusion in sort-tests
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.

8 years agoAvoid describe-key error with lambdas
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.

8 years ago* lisp/emacs-lisp/package.el (package-install-selected-packages):
Artur Malabarba [Mon, 4 Apr 2016 14:58:49 +0000 (11:58 -0300)]
* lisp/emacs-lisp/package.el (package-install-selected-packages):

Skip unavailable packages.

8 years agoSync with gnulib
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.

8 years agoFix doc for Universal Time
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’.

8 years ago; * src/keyboard.c (read_char): Fix typos in a comment.
Eli Zaretskii [Sun, 3 Apr 2016 17:06:51 +0000 (20:06 +0300)]
; * src/keyboard.c (read_char): Fix typos in a comment.

8 years agoHandle Bug#23186
Michael Albinus [Sun, 3 Apr 2016 07:37:16 +0000 (09:37 +0200)]
Handle Bug#23186

* lisp/net/tramp.el (tramp-encoding-command-switch)
(tramp-encoding-command-interactive):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
`tramp-encoding-shell' could be nil.  (Bug#23186)

8 years agoMore format-time-string change fixups
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.

8 years agomake-xwidget unused arg cleanup
Paul Eggert [Sun, 3 Apr 2016 00:50:03 +0000 (17:50 -0700)]
make-xwidget unused arg cleanup

* doc/lispref/display.texi (Xwidgets): Remove stray refs.
* src/xwidget.c (syms_of_xwidget): Qwebkit, not Qwebkit_osr.

8 years agoRemove unused arguments from make-xwidget
Joakim Verona [Sun, 3 Apr 2016 00:49:27 +0000 (17:49 -0700)]
Remove unused arguments from make-xwidget

The arguments BEG and END were unused, and are now removed.

* display.texi (Xwidgets): Document the change
* xwidget.el (make-xwidget, xwidget-insert)
(xwidget-webkit-new-session): Reflect changed arguments
* xwidget.c (Fmake_xwidget, syms_of_xwidget): Reflect changed arguments

8 years agoDocument incompatible changes in 'format-time-string'
Eli Zaretskii [Sat, 2 Apr 2016 13:23:05 +0000 (16:23 +0300)]
Document incompatible changes in 'format-time-string'

* etc/NEWS: Mention the incompatible change in the interpretation
of the 3rd argument to 'format-time-string'.  (Bug#21943)

8 years agoImprove documentation of byte-code objects
Eli Zaretskii [Sat, 2 Apr 2016 12:13:00 +0000 (15:13 +0300)]
Improve documentation of byte-code objects

* doc/lispref/compile.texi (Byte-Code Objects): Document the
integer format of the argument descriptor.  (Bug#23061)

8 years agoAdapt calls to 'format-time-string' to changes in Emacs 25
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.

8 years agoImprove vc-diff with Git backend
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.

8 years ago(js--continued-expression-p): Special-case unary plus and minus
Dmitry Gutov [Sat, 2 Apr 2016 00:02:03 +0000 (03:02 +0300)]
(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).

8 years ago; * lisp/vc/vc-annotate.el (vc-annotate): Clarify commentary.
Eli Zaretskii [Fri, 1 Apr 2016 20:22:52 +0000 (23:22 +0300)]
; * lisp/vc/vc-annotate.el (vc-annotate): Clarify commentary.

8 years agoPrevent C++ Mode wrongly fontifying some identifiers near templates as types
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 "(".

8 years agoAvoid crashes due to insanely large columns in tabulated-list-format
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'.

8 years agoTeach M-x disassemble a default argument.
Mark Oteiza [Thu, 31 Mar 2016 23:34:05 +0000 (19:34 -0400)]
Teach M-x disassemble a default argument.

Adopts default argument in the same way as `describe-function'.
* lisp/emacs-lisp/disass.el (disassemble): Default to function at point,
if any.

8 years agoFix EOL decoding in vc-annotate with SVN back-end on MS-Windows
Eli Zaretskii [Thu, 31 Mar 2016 20:01:13 +0000 (23:01 +0300)]
Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows

* lisp/vc/vc-annotate.el (vc-annotate): Force DOS EOL decoding on
MS-Windows and MS-DOS, when processing the output of "svn annotate".

8 years agoFix OS X specific settings in tramp-tests
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)

8 years agoFinish fixing a cacheing bug in CC Mode (see 2016-03-09)
Alan Mackenzie [Wed, 30 Mar 2016 17:14:03 +0000 (17:14 +0000)]
Finish fixing a cacheing bug in CC Mode (see 2016-03-09)

* lisp/progmodes/cc-cmds.el: (c-beginning-of-defun, c-end-of-defun): Remove
superfluous invocations of c-self-bind-state-cache.

* lisp/progmodes/cc-defs.el: (c-self-bind-state-cache): Copy and terminate
markers correctly.

* lisp/progmodes/cc-engine.el (c-record-parse-state-state): Terminate stale
markers.

8 years agoMerge branch 'emacs-25' of /home/acm/emacs/emacs.git/emacs-25 into emacs-25
Alan Mackenzie [Wed, 30 Mar 2016 16:53:36 +0000 (16:53 +0000)]
Merge branch 'emacs-25' of /home/acm/emacs/emacs.git/emacs-25 into emacs-25

8 years ago* doc/lispref/text.texi (Columns): Remove a nonexistent reference.
Xue Fuqiao [Wed, 30 Mar 2016 00:01:16 +0000 (08:01 +0800)]
* doc/lispref/text.texi (Columns): Remove a nonexistent reference.

The example was removed by Chong Yidong on Mar 5, 2012.

8 years ago* doc/man/emacsclient.1: Document +line:column option.
Paul Eggert [Tue, 29 Mar 2016 21:19:46 +0000 (14:19 -0700)]
* doc/man/emacsclient.1: Document +line:column option.

8 years agoFix rare problems with echo-area display and multiple frames
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)

8 years agoIn M-%, avoid making buffer-local binding of text-property-default-nonsticky
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.

8 years agoRemove prog-indentation-context
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.

Do not merge to master.

8 years ago* src/font.c (QCuser_spec): Add missing colon to :user-spec.
Paul Eggert [Sun, 27 Mar 2016 22:02:37 +0000 (15:02 -0700)]
* src/font.c (QCuser_spec): Add missing colon to :user-spec.

8 years agoDon't start the 'midnight' timer twice
Eli Zaretskii [Sun, 27 Mar 2016 15:15:06 +0000 (18:15 +0300)]
Don't start the 'midnight' timer twice

* lisp/midnight.el (midnight-mode): Avoid starting the midnight
timer twice when activating the mode the first time.  (Bug#23123)

8 years ago* src/xwidget.c (Fxwidget_resize): Fix inappropriate use of XFASTINT.
YAMAMOTO Mitsuharu [Sun, 27 Mar 2016 09:00:08 +0000 (18:00 +0900)]
* src/xwidget.c (Fxwidget_resize): Fix inappropriate use of XFASTINT.

8 years agoFix todo-mode category movement
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.

8 years ago* lisp/xt-mouse.el (xterm-mouse-utf-8): Add :version.
Glenn Morris [Sat, 26 Mar 2016 20:45:51 +0000 (16:45 -0400)]
* lisp/xt-mouse.el (xterm-mouse-utf-8): Add :version.

8 years agoIgnore non-nil. non-cons values of unread-command-events
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)

8 years agoImprove documentatuon of 'truncate-partial-width-windows'
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.

8 years ago* src/ftfont.c (ftfont_shape_by_flt): Parenthesize as per GNU style.
Paul Eggert [Fri, 25 Mar 2016 17:58:52 +0000 (10:58 -0700)]
* src/ftfont.c (ftfont_shape_by_flt): Parenthesize as per GNU style.

8 years agoFix 'dired-goto-file' in Dired buffers produced by find-dired
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)

8 years agoFix map-put and map-delete for alists (Bug#23105)
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.

8 years agoMinor copyedits of documentation for temporary displays
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.

8 years agoAdd customization option for using UTF-8 coordinates in xt-mouse
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.

8 years agoMinor doc string fixes in replace.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)

8 years agoFix scrolling upwards with 'xwidget-webkit-browse-url'
Eli Zaretskii [Fri, 25 Mar 2016 09:51:57 +0000 (12:51 +0300)]
Fix scrolling upwards with 'xwidget-webkit-browse-url'

* src/xwidget.c (Fxwidget_set_adjustment): Use CHECK_NUMBER instead
of CHECK_NATNUM.  Suggested by Shayan Pirani <shayanpirani@gmail.com>.
(Bug#22918)

8 years agoFix display of Indic scripts
K. Handa [Fri, 25 Mar 2016 09:40:25 +0000 (12:40 +0300)]
Fix display of Indic scripts

* ftfont.c (ftfont_shape_by_flt): For combining characters out
of the range U+300...U+36F, use the "combining" FLT only with
non-OTF fonts.

8 years agoFix splash screen display at startup
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.

* etc/NEWS: Mention the change.

8 years ago; In NEWS mention new display of minibuffer completions window
Martin Rudalics [Fri, 25 Mar 2016 07:38:34 +0000 (08:38 +0100)]
; In NEWS mention new display of minibuffer completions window

8 years agoDescribe temporary displays in Emacs manual
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'.

8 years agoAvoid stray As next to IDLW icons
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).

8 years agoAvoid GTK 3 crash with icons and masks
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.

8 years ago* lisp/minibuffer.el (minibuffer-completion-help): Use fit-window-to-buffer
Juri Linkov [Thu, 24 Mar 2016 22:14:24 +0000 (00:14 +0200)]
* lisp/minibuffer.el (minibuffer-completion-help): Use fit-window-to-buffer

instead of shrink-window-if-larger-than-buffer.  (Bug#23092)

8 years agoDefine make_save_ptr_ptr unconditionally
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)

8 years agoPreserve current buffer when popping up TTY menus
Eli Zaretskii [Thu, 24 Mar 2016 18:05:49 +0000 (20:05 +0200)]
Preserve current buffer when popping up TTY menus

* src/term.c (tty_menu_show): Be sure to save and restore the
current buffer around TTY menu pop-ups.  (Bug#23101)

8 years agoImprove font selection by family on MS-Windows
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.

8 years agoComint, term, and compile now set EMACS
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.

8 years agoIgnore more merges when generating ChangeLog
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.

8 years agoSync with gnulib
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.

8 years agoResurrect GNUS-NEWS autogeneration
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.

8 years ago; Backport ChangeLog.2 fixes from master
Paul Eggert [Tue, 22 Mar 2016 20:22:29 +0000 (13:22 -0700)]
; Backport ChangeLog.2 fixes from master

8 years agoMake `toggle-frame-maximized' respect the dock on OS X (bug#22988).
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.

8 years agoFix bug in displaying header line with a box face
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)

8 years agoFix an Isearch var to be a string (Bug#23038)
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.

8 years agoFix (args-out-of-range 1) error in cursor-sensor--detect
Leo Liu [Mon, 21 Mar 2016 10:26:10 +0000 (18:26 +0800)]
Fix (args-out-of-range 1) error in cursor-sensor--detect

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Don't
  hard-code (point-min) as 1 which fails in narrowed buffers.

8 years agoRender empty <ul><li><ul> correctly
Lars Magne Ingebrigtsen [Sun, 20 Mar 2016 12:52:36 +0000 (13:52 +0100)]
Render empty <ul><li><ul> correctly

* lisp/net/shr.el (shr-tag-ul): Render empty <ul><li><ul>
correctly (bug#22964).
(cherry picked from commit 4f6ea3988b66cf132c67fd0cc26d12eb9a300ba1)

Backport:

8 years agoIgnore invalid base64 encoded embedded images
Lars Magne Ingebrigtsen [Sun, 20 Mar 2016 12:57:11 +0000 (13:57 +0100)]
Ignore invalid base64 encoded embedded images

* lisp/net/shr.el (shr-image-from-data): Ignore invalid base64
encoded embedded images (bug#22928).
(cherry picked from commit f2da80d0e1ccd121c4891e869a45aeb9c6b1795d)

Backport:

8 years agoFix <p> and <div> newlines with or without <li> in shr
Lars Magne Ingebrigtsen [Sun, 20 Mar 2016 12:43:42 +0000 (13:43 +0100)]
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)

Backport:

8 years agoAvoid errors in 'newline'
Eli Zaretskii [Sat, 19 Mar 2016 19:32:27 +0000 (21:32 +0200)]
Avoid errors in 'newline'

* lisp/simple.el (newline): Don't barf if invoked with
non-positive argument in the middle of a line.  (Bug#22490)

8 years agoFix Bug#23032
Michael Albinus [Sat, 19 Mar 2016 15:51:46 +0000 (16:51 +0100)]
Fix Bug#23032

* doc/misc/eshell.texi (Arguments): Mention the pipe symbol in
remote file names.  (Bug#23032)

8 years agoAdjudicate review comments in abbrevs.texi
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.