]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoFix `delete-frame' behavior including Bug#26682
Martin Rudalics [Sun, 30 Apr 2017 08:02:53 +0000 (10:02 +0200)]
Fix `delete-frame' behavior including Bug#26682

* src/frame.c (other_frames): Accept two arguments now.  Don't
care about minibuffer window.  Don't care about visibility when
called from delete_frame with FORCE true (Bug#26682).
(delete_frame, Fmake_frame_invisible): Adjust other_frames
calls.
* src/w32term.c (w32_read_socket): Don't add a move frame event
for an invisible frame.
* lisp/frame.el (handle-delete-frame): Don't kill Emacs when
attempting to delete a surrogate minibuffer frame.

7 years agoMerge from gnulib
Paul Eggert [Sun, 30 Apr 2017 07:38:28 +0000 (00:38 -0700)]
Merge from gnulib

This avoids incorporating the following, which I suspect are
more trouble for Emacs than they’re worth:
2017-04-29 stat, fstat: fix time_t etc. on native Windows platforms
* admin/merge-gnulib (AVOIDED_MODULES): Avoid stat, too.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/pathmax.h, lib/stat.c, m4/pathmax.m4, m4/stat.m4: Remove.

7 years agoFix buffer overflow in make-docfile
Paul Eggert [Sun, 30 Apr 2017 06:35:27 +0000 (23:35 -0700)]
Fix buffer overflow in make-docfile

* lib-src/make-docfile.c (scan_c_stream): Check for buffer
overflow when reading an identifier.  Use a static buffer for NAME
rather than a small dynamically-allocated buffer.

7 years agoMerge from gnulib
Paul Eggert [Sun, 30 Apr 2017 06:11:16 +0000 (23:11 -0700)]
Merge from gnulib

This incorporates:
2017-04-29 getopt: port to Solaris 10 with circa-1997 glibc getopt.h
* lib/getopt-pfx-ext.h: Copy from gnulib.
* lib/gnulib.mk.in: Regenerate.

7 years agoFix dependency error during bootstrap
Tino Calancha [Sun, 30 Apr 2017 02:33:37 +0000 (11:33 +0900)]
Fix dependency error during bootstrap

* lisp/files.el: Require pcase and easy-mmode at compile time.

7 years ago* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL
Mats Lidell [Sat, 29 Apr 2017 22:14:45 +0000 (00:14 +0200)]
* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL

7 years ago; Fix function name
Philipp Stephani [Sat, 29 Apr 2017 19:29:55 +0000 (21:29 +0200)]
; Fix function name

7 years agoReimplement auto-saving to visited files
Philipp Stephani [Sat, 22 Apr 2017 18:58:38 +0000 (20:58 +0200)]
Reimplement auto-saving to visited files

This reacts to confusing behavior of 'auto-save-visited-file-name',
cf. Bug#25478.

* lisp/files.el (auto-save-visited-interval): New customization option.
(auto-save-visited-mode): New global minor mode.
(auto-save-visited-file-name): Make obsolete.
(auto-save--timer): New internal helper variable.

* doc/emacs/files.texi (Auto Save Files): Document
'auto-save-visited-mode' instead of obsolete
'auto-save-visited-file-name'.
(Auto Save Control): Document customization option
'auto-save-visited-interval'.

7 years agoAllow bypassing of some checks when merging
Paul Eggert [Sat, 29 Apr 2017 18:28:52 +0000 (11:28 -0700)]
Allow bypassing of some checks when merging

* build-aux/git-hooks/pre-commit: Don't check merged-in changes.

7 years agoIntegrate module test with normal test suite
Philipp Stephani [Sat, 22 Apr 2017 13:41:39 +0000 (15:41 +0200)]
Integrate module test with normal test suite

* test/Makefile.in (ELFILES): Exclude module test if modules aren't
configured.
(EMACS_TEST_DIRECTORY): Expand test directory so that it's set
correctly even if Emacs changes the current directory.
($(srcdir)/src/emacs-module-tests.log)
($(test_module)): Proper dependency tracking for test module.

* test/data/emacs-module/Makefile (ROOT): Adapt to new location.
Remove 'check' target and EMACS variable, which are no longer
necessary.
(SO): Change to include period.

* test/src/emacs-module-tests.el (mod-test): Use EMACS_TEST_DIRECTORY
environment variable to reliably find test data.

* configure.ac (HAVE_MODULES, MODULES_SUFFIX): Add necessary
substitutions.

7 years agoBroaden comint-password-prompt-regexp
Glenn Morris [Fri, 28 Apr 2017 20:17:27 +0000 (16:17 -0400)]
Broaden comint-password-prompt-regexp

* lisp/comint.el (comint-password-prompt-regexp):
Broaden the regexp, for non-English locales.  (Bug#26698)

7 years ago* lisp/auth-source.el (auth-source-backend-parse): `return' -> cl-return.
Stefan Monnier [Fri, 28 Apr 2017 12:21:39 +0000 (08:21 -0400)]
* lisp/auth-source.el (auth-source-backend-parse): `return' -> cl-return.

7 years agoDon't pass the value of point to 'push-mark', as that's the default.
Bartosz Duszel [Fri, 28 Apr 2017 08:25:26 +0000 (11:25 +0300)]
Don't pass the value of point to 'push-mark', as that's the default.

* lisp/textmodes/bib-mode.el (mark-bib):
* lisp/simple.el (mark-whole-buffer, yank):
* lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
* lisp/progmodes/xscheme.el (xscheme-yank):
* lisp/progmodes/verilog-mode.el (verilog-mark-defun):
* lisp/progmodes/perl-mode.el (perl-mark-function):
* lisp/progmodes/pascal.el (pascal-mark-defun):
* lisp/progmodes/meta-mode.el (meta-mark-defun):
* lisp/progmodes/icon.el (mark-icon-function):
* lisp/progmodes/cc-cmds.el (c-mark-function):
* lisp/obsolete/vip.el (ex-goto):
* lisp/obsolete/vi.el (vi-put-before):
* lisp/mouse.el (mouse-yank-primary):
* lisp/menu-bar.el (menu-bar-select-yank):
* lisp/mail/sendmail.el (mail-yank-original):
* lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
* lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer)
(viper-mark-end-of-buffer):
* lisp/cedet/semantic/senator.el (senator-mark-defun):
* lisp/allout.el (allout-mark-topic): Remove unnecessary argument
`(point)' from calls to `push-mark'.  (Bug#25565)

7 years agoMerge from origin/emacs-25
Glenn Morris [Fri, 28 Apr 2017 05:03:56 +0000 (22:03 -0700)]
Merge from origin/emacs-25

784602b1050 (origin/emacs-25) ; Add release notice
3a34412caae (tag: emacs-25.2) Set Emacs version to 25.2 and update AU...
56a4461a48d ; Move stray item from admin/notes/repo to CONTRIBUTE
2b0d1118199 ; CONTRIBUTE: Remove stray header.
f2ab09ec60d Fix a typo in indexing the user manual
bc55a574235 * lisp/menu-bar.el (kill-this-buffer): Doc fix.  (Bug#26466)
a6d50401b4b Document 'line-pixel-height'
0c55cf43e61 * search.c (Fre_search_forward, Fre_search_backward): Imp...
c7ed57eaef4 Mention that processes start in default-directory (Bug#18...
856ec9ffa1f * src/xdisp.c (vmessage, message): Clarify commentary.
849a0aaa1c9 Belated fixes for admin.el's M-x make-manuals-dist
84938d79698 default-directory: Remark that it must be a directory name
3f0d047d2eb Delete confuse statement in manual
ee1bd94dd0c Improve packaging documentation
fb18bff91f0 Expand manual section on quitting windows
9a737079645 Fix docstring of dabbrev-abbrev-char-regexp
afe8849bac1 * doc/misc/cl.texi (Iteration Clauses): Clarify example (...
ada79442c07 ;* doc/misc/info.texi (Choose menu subtopic): Improve ind...
d38fd9229c0 Narrow scope of modification hook renabling in org-src fo...
e0e9db4c84a ; Spelling fix

# Conflicts:
# README
# etc/AUTHORS
# etc/HISTORY
# lisp/ldefs-boot.el

7 years ago* doc/misc/auth.texi: Commas don't work in node names.
Glenn Morris [Fri, 28 Apr 2017 04:33:07 +0000 (21:33 -0700)]
* doc/misc/auth.texi: Commas don't work in node names.

7 years ago* test/lisp/auth-source-pass-tests.el: Fix loading of cl-lib.
Glenn Morris [Fri, 28 Apr 2017 04:19:47 +0000 (21:19 -0700)]
* test/lisp/auth-source-pass-tests.el: Fix loading of cl-lib.

7 years ago; Fix copyright and license notice in recent additions
Glenn Morris [Fri, 28 Apr 2017 04:17:45 +0000 (21:17 -0700)]
; Fix copyright and license notice in recent additions

7 years agoTest format-time-string with zone arg
Paul Eggert [Thu, 27 Apr 2017 22:22:49 +0000 (15:22 -0700)]
Test format-time-string with zone arg

* test/src/editfns-tests.el (format-time-string-with-zone)
(format-time-string-with-outlandish-zone): New tests.

7 years agoMerge from gnulib
Paul Eggert [Thu, 27 Apr 2017 22:21:34 +0000 (15:21 -0700)]
Merge from gnulib

This incorporates:
2017-04-24 time_rz: fix heap buffer overflow vulnerability
2017-04-23 stat-time: Update comments.
2017-04-22 ftoastr: cite a newer paper
2017-04-21 gettext-h: Avoid -Wundef warning.
* lib/ftoastr.c, lib/gettext.h, lib/stat-time.h, lib/time_rz.c:
* m4/getopt.m4: Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.

7 years agoauth-source-pass: Add documentation; fix tests and indentation.
Damien Cassou [Mon, 3 Apr 2017 19:36:03 +0000 (21:36 +0200)]
auth-source-pass: Add documentation; fix tests and indentation.

* doc/misc/auth.texi: Document new integration with Pass. Use @itemize
  instead of @enumerate.
* lisp/auth-source-pass.el: Fix indentation.
  (auth-source-pass--remove-directory-name): Remove.
* test/lisp/auth-source-pass-tests.el: Adjust test macros.

7 years agoauth-source-pass: Enable finding entries by "host/username"
foudfou [Thu, 16 Feb 2017 08:34:17 +0000 (09:34 +0100)]
auth-source-pass: Enable finding entries by "host/username"

* lisp/auth-source-pass.el: Enable finding entries by "host/username".
* test/lisp/auth-source-pass-tests.el: Adjust tests to check it.

7 years agoIntegrate auth-source with password-store
Damien Cassou [Sat, 4 Feb 2017 07:51:32 +0000 (08:51 +0100)]
Integrate auth-source with password-store

* lisp/auth-source-pass.el: auth-source backend for password-store.
* test/lisp/auth-source-pass-tests.el: Tests for auth-source-pass
  behavior.

7 years ago* lisp/auth-source.el: Document parser functions.
Damien Cassou [Sat, 4 Feb 2017 07:09:44 +0000 (08:09 +0100)]
* lisp/auth-source.el: Document parser functions.

7 years agoauth-source: factor out parsers and add tests
Ted Zlatanov [Fri, 3 Feb 2017 21:06:12 +0000 (16:06 -0500)]
auth-source: factor out parsers and add tests

* lisp/auth-source.el: Factor out the source parsers. Clean up comments.
* test/lisp/auth-source-tests.el: Add tests.

7 years agoFix doc and customization type of `window-combination-limit' (Bug#26673)
Martin Rudalics [Thu, 27 Apr 2017 08:18:48 +0000 (10:18 +0200)]
Fix doc and customization type of `window-combination-limit' (Bug#26673)

* src/window.c (Vwindow_combination_limit): Fix doc-string.
* lisp/cus-start.el (window-combination-limit): Fix
customization type.
* doc/lispref/windows.texi (Recombining Windows): Fix
documentation of `window-combination-limit'.

7 years ago; Fix MPC menu title
Mark Oteiza [Thu, 27 Apr 2017 04:04:54 +0000 (00:04 -0400)]
; Fix MPC menu title

* lisp/mpc.el (mpc-mode-menu): Refer to the name of the mode, not the
file name.

7 years agoDrop face from hi-lock--unused-faces only when used
Tino Calancha [Thu, 27 Apr 2017 03:01:19 +0000 (12:01 +0900)]
Drop face from hi-lock--unused-faces only when used

* lisp/hi-lock.el (hi-lock-set-pattern): If REGEXP is already
highlighted, then push FACE into hi-lock--unused-faces (Bug#26666).
* test/lisp/hi-lock-tests.el (hi-lock-bug26666): Add test.

7 years agoFix macOS version check (bug#26664)
Alan Third [Wed, 26 Apr 2017 19:01:39 +0000 (20:01 +0100)]
Fix macOS version check (bug#26664)

* src/nsterm.m (initFrameFromEmacs): Prevent window tabbing mode on
macOS versions 10.12+.

7 years ago; * lisp/Makefile.in: More comments about loaddefs.
Glenn Morris [Wed, 26 Apr 2017 18:23:55 +0000 (14:23 -0400)]
; * lisp/Makefile.in: More comments about loaddefs.

7 years ago; * lisp/Makefile.in: Comments about loaddefs.
Glenn Morris [Wed, 26 Apr 2017 18:12:56 +0000 (14:12 -0400)]
; * lisp/Makefile.in: Comments about loaddefs.

7 years agoMake charprop.el provide a feature
Glenn Morris [Wed, 26 Apr 2017 16:51:48 +0000 (12:51 -0400)]
Make charprop.el provide a feature

* admin/unidata/unidata-gen.el (unidata-gen-charprop):
Provide a feature.
* lisp/loadup.el: Use the charprop feature.

7 years ago; * lisp/loadup.el: Revert accidental blank line in previous.
Glenn Morris [Wed, 26 Apr 2017 16:35:09 +0000 (12:35 -0400)]
; * lisp/loadup.el: Revert accidental blank line in previous.

7 years ago* lisp/loadup.el: Get charprop.el into etc/DOC again.
Glenn Morris [Wed, 26 Apr 2017 16:32:10 +0000 (12:32 -0400)]
* lisp/loadup.el: Get charprop.el into etc/DOC again.

7 years ago* lisp/ido.el (ido-everywhere): Use add-function.
Stefan Monnier [Wed, 26 Apr 2017 14:03:17 +0000 (10:03 -0400)]
* lisp/ido.el (ido-everywhere): Use add-function.

7 years agoTry to fix latest fix of w32_mouse_position
Martin Rudalics [Wed, 26 Apr 2017 13:20:09 +0000 (15:20 +0200)]
Try to fix latest fix of w32_mouse_position

* src/w32term.c (w32_mouse_position): Fix a bug introduced by
latest fix and try to make the affected code more rigorous.

7 years agoAvoid segfaults when 'find-font' is invoked for a TTY frame
Eli Zaretskii [Wed, 26 Apr 2017 12:09:12 +0000 (15:09 +0300)]
Avoid segfaults when 'find-font' is invoked for a TTY frame

* src/font.c (font_pixel_size): Don't call GUI functions if F is a
text-mode frame.  (Bug#26646)

7 years ago* lisp/net/tramp.el (tramp-set-connection-local-variables-for-buffer):
Michael Albinus [Wed, 26 Apr 2017 07:59:45 +0000 (09:59 +0200)]
* lisp/net/tramp.el (tramp-set-connection-local-variables-for-buffer):

New defun.

7 years ago* src/Makefile.in (leimdir): Remove variable, no longer used.
Glenn Morris [Wed, 26 Apr 2017 00:43:05 +0000 (20:43 -0400)]
* src/Makefile.in (leimdir): Remove variable, no longer used.

7 years agoGenerate leim-list via lisp/Makefile, not src/Makefile
Glenn Morris [Tue, 25 Apr 2017 23:30:31 +0000 (19:30 -0400)]
Generate leim-list via lisp/Makefile, not src/Makefile

* src/Makefile.in ($(leimdir)/leim-list.el): Remove rule.
(emacs$(EXEEXT)): Don't depend on leim-list.
* lisp/Makefile.in ($(lisp)/loaddefs.el): Depend on gen-lisp again.

7 years agoFix define for GNUstep builds
Alan Third [Tue, 25 Apr 2017 20:44:40 +0000 (21:44 +0100)]
Fix define for GNUstep builds

* src/nsterm.m (initFrameFromEmacs): Fix the ifdef so that GNUstep
doesn't see the code.

7 years agoSuppress intermittent test failure on hydra
Glenn Morris [Tue, 25 Apr 2017 20:20:00 +0000 (16:20 -0400)]
Suppress intermittent test failure on hydra

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-test-method-order-list-6): Skip on hydra.

7 years agoFix some NS frame handling issues
Alan Third [Tue, 25 Apr 2017 19:55:40 +0000 (20:55 +0100)]
Fix some NS frame handling issues

* src/nsterm.m (FRAME_DECORATED_FLAGS, FRAME_UNDECORATED_FLAGS): New
defines intended to make things tidier.
(x_set_undecorated): Use the new defines.
(windowWillResize): Don't use new macOS 12+ only feature.
(initFrameFromEmacs): Use the new defines, and disable automatic
window tabbing feature in macOS 12.
(x_set_undecorated, x_set_parent_frame, x_set_no_accept_focus,
x_set_z_group): Add NSTRACE notices.

7 years agoAvoid parallel race condition
Glenn Morris [Tue, 25 Apr 2017 19:05:52 +0000 (15:05 -0400)]
Avoid parallel race condition

* lisp/Makefile.in ($(lisp)/loaddefs.el): Remove gen-lisp for now.

7 years agoGenerate each unicode lisp file independently
Glenn Morris [Tue, 25 Apr 2017 05:53:22 +0000 (22:53 -0700)]
Generate each unicode lisp file independently

This is better for parallel builds, eg it eliminates race
conditions from having one process write multiple files.
* admin/unidata/Makefile.in (lparen, unifiles): New variables.
Parse unidata-gen.el, not charprop.el, to get the list of uni- files.
(all): Explicitly list the output lisp files.
(PHONY_EXTRAS): Remove.
(${unidir}/charprop.el): Change rule to just be for this file.
(${unifiles}): New rule to write each unicode lisp file.
(extraclean): Simplify.
* admin/unidata/unidata-gen.el (unidata-gen-charprop):
Quieten in batch mode.
(unidata-gen-files): Remove, no longer used.
* lisp/loadup.el: Update command-line parser.

7 years agoFurther refactoring in unidata-gen.el
Glenn Morris [Tue, 25 Apr 2017 05:17:27 +0000 (22:17 -0700)]
Further refactoring in unidata-gen.el

* admin/unidata/unidata-gen.el (unidata-gen-charprop):
New function, split from unidata-gen-files.
(unidata-gen-files): Use unidata-gen-charprop.

7 years agoAllow unidata-gen-file to work independently
Glenn Morris [Tue, 25 Apr 2017 05:14:38 +0000 (22:14 -0700)]
Allow unidata-gen-file to work independently

* admin/unidata/unidata-gen.el (unidata-gen-file):
Make it work as a stand-alone function in batch mode.
(unidata-gen-files): Pass extra arguments to unidata-gen-file.

7 years agoPreparatory refactoring in unidata-gen.el
Glenn Morris [Tue, 25 Apr 2017 05:08:44 +0000 (22:08 -0700)]
Preparatory refactoring in unidata-gen.el

* admin/unidata/unidata-gen.el (unidata-gen-file):
New function, split from unidata-gen-files.
(unidata-gen-files): Use unidata-gen-file.

7 years agoWrite each generated character property lisp file only once
Glenn Morris [Sun, 23 Apr 2017 23:31:02 +0000 (16:31 -0700)]
Write each generated character property lisp file only once

* admin/unidata/unidata-gen.el (unidata-file-alist):
Rename from unidata-prop-alist.  All users changed.
Use file name rather than property name as the key.
(unidata-prop-prop): New function.
(unidata-prop-index, unidata-prop-generator, unidata-prop-docstring)
(unidata-prop-describer, unidata-prop-default, unidata-prop-val-list):
Change to parse the argument rather than unidata-prop-alist.
(unidata-gen-table-character, unidata-gen-table)
(unidata-gen-table-symbol, unidata-gen-table-integer)
(unidata-gen-table-numeric, unidata-gen-table-word-list)
(unidata-gen-table-name, unidata-gen-table-decomposition)
(unidata-gen-table-special-casing): Pass index as an argument.
(unidata-check): Adapt to unidata-file-alist.
Pass index to generator functions.
(unidata-gen-files): Adapt to unidata-file-alist.
Write each output file once only.  Overwrite rather than delete.

7 years agoFix requesting sparse articles in gnus
Andrew G Cohen [Tue, 25 Apr 2017 05:13:10 +0000 (13:13 +0800)]
Fix requesting sparse articles in gnus

* lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Delete the
sparse article number from the list, not its id.

7 years agoDon't advertise s_client in tls.el docs
Glenn Morris [Tue, 25 Apr 2017 00:06:14 +0000 (20:06 -0400)]
Don't advertise s_client in tls.el docs

* lisp/net/tls.el (tls-end-of-info, tls-success, tls-untrusted):
Don't mention s_client in docs.
; * doc/misc/gnus.texi (Direct Functions): Comment.

7 years agoRemove s_client usage from tls.el
Rob Browning [Mon, 24 Apr 2017 23:58:45 +0000 (19:58 -0400)]
Remove s_client usage from tls.el

* lisp/net/tls.el (tls-program, tls-checktrust): Remove s_client.
Ref http://bugs.debian.org/766397
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00803.html

; Backport this to Emacs 25.3, if there is one

7 years agoFurther robustify cedet bootstrap to loaddefs not yet built
Glenn Morris [Mon, 24 Apr 2017 23:51:20 +0000 (19:51 -0400)]
Further robustify cedet bootstrap to loaddefs not yet built

* lisp/cedet/semantic/util.el (semantic-something-to-tag-table):
Avoid void-function error when bootstrapping and semantic/loaddefs.el
does not yet exist.

7 years agoFix XBM colour rendering in NS port (bug#22060)
Alan Third [Mon, 24 Apr 2017 09:23:28 +0000 (10:23 +0100)]
Fix XBM colour rendering in NS port (bug#22060)

src/nsimage.m (setXBMColor): Fix calculation of xbm_fg.

7 years agoAdd support for IRCv3 message tags.
Vibhav Pant [Mon, 24 Apr 2017 06:27:46 +0000 (11:57 +0530)]
Add support for IRCv3 message tags.

* erc-backend.el:
  erc-response: Add `tags' element.
  Add (erc-parse-tags).
  (erc-parse-server-response): Use (erc-parse-tags) to parse message
  tags (if any), and store them in `erc-resopnse' struct.

* erc.el: (erc-display-message): Expose message tags with text
  properties of the corresponding message line.

7 years agoAdd image sizing tests for an image that's narrow
Lars Ingebrigtsen [Mon, 24 Apr 2017 05:56:31 +0000 (07:56 +0200)]
Add image sizing tests for an image that's narrow

7 years agoNeedlessly refactor tests for clarity
Lars Ingebrigtsen [Mon, 24 Apr 2017 05:47:09 +0000 (07:47 +0200)]
Needlessly refactor tests for clarity

7 years agoAdd missing remappings for Ido mode
Philipp Stephani [Thu, 20 Apr 2017 13:41:15 +0000 (15:41 +0200)]
Add missing remappings for Ido mode

Among others, add a remapping for C-x 4 d, cf. Bug#26360.

* lisp/ido.el (ido-mode): Remap missing commands.
(ido-file-internal, ido-visit-buffer): Add support for new
methods.
(ido-display-buffer-other-frame)
(ido-find-alternate-file-other-window, ido-dired-other-window)
(ido-dired-other-frame): New commands.

* test/lisp/ido-tests.el (ido-tests--other-window-frame): Add unit
test for the bindings.

7 years agoLet w32_mouse_position pick a child window only if it has a child frame
Martin Rudalics [Sun, 23 Apr 2017 08:52:56 +0000 (10:52 +0200)]
Let w32_mouse_position pick a child window only if it has a child frame

* src/w32term.c (w32_mouse_position): When using a frame found
by ChildWindowFromPoint make sure it's a child frame (Bug#26615,
maybe).

7 years agoDon't require bytecomp for running ert tests
Noam Postavsky [Wed, 5 Apr 2017 03:48:42 +0000 (23:48 -0400)]
Don't require bytecomp for running ert tests

"Fix ert-tests when running compiled" 2016-12-06 accidentally
introduced a dependency on `bytecomp' into `ert'.  As mentioned in
"Avoid ert test failures" 2017-04-18, the accidental dependency of ert
on bytecomp was masked by loading other libraries until recently.

* lisp/emacs-lisp/ert.el (ert--expand-should-1): Only use
`byte-compile-macro-environment' if it's bound.
* test/src/eval-tests.el: Add defvar for dynamic variable
`byte-compile-debug'.

7 years agoEliminate unneeded warp-to-article in gnus article referral
Andrew G Cohen [Sun, 23 Apr 2017 01:05:49 +0000 (09:05 +0800)]
Eliminate unneeded warp-to-article in gnus article referral

* lisp/gnus/gnus-sum.el (gnus-summary-refer-thread):
(gnus-summary-refer-article): Remove gnus-warp-to article call.

7 years agoAllow limiting gnus summary buffers to a thread
Andrew G Cohen [Sun, 23 Apr 2017 00:25:02 +0000 (08:25 +0800)]
Allow limiting gnus summary buffers to a thread

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Include
an optional argument to allow limiting the summary buffer to just the
thread-related articles.
(gnus-refer-thread-limit-to-thread): Introduce customizable variable
to control whether thread-referral adds the thread to the summary
buffer or limits to just the thread.
(gnus-summary-refer-thread): Use the new variable.

7 years agoCorrect gnus-newsgroup-limits in gnus when including thread
Andrew G Cohen [Sun, 23 Apr 2017 00:13:09 +0000 (08:13 +0800)]
Correct gnus-newsgroup-limits in gnus when including thread

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Should
only add one list of thread-related articles to gnus-newsgroup-limits
rather than two.

7 years agoImprove gnus thread matching of similar subjects
Andrew G Cohen [Sun, 23 Apr 2017 00:07:22 +0000 (08:07 +0800)]
Improve gnus thread matching of similar subjects

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread):
Use the more liberal gnus-general-simplify-subject regexp to
find thread articles with similar subjects.

7 years ago; Merge: improve indent-sexp and lisp-indent-region performance
Noam Postavsky [Sat, 22 Apr 2017 18:10:58 +0000 (14:10 -0400)]
; Merge: improve indent-sexp and lisp-indent-region performance

7 years agoAdd new `lisp-indent-region' that doesn't reparse the code.
Noam Postavsky [Thu, 16 Mar 2017 02:27:27 +0000 (22:27 -0400)]
Add new `lisp-indent-region' that doesn't reparse the code.

Both `lisp-indent-region' and `lisp-indent-line' now use `syntax-ppss'
to get initial state, so they will no longer indent string literal
contents.

* lisp/emacs-lisp/lisp-mode.el (lisp-ppss): New function, like
`syntax-ppss', but with a more dependable item 2.
(lisp-indent-region): New function, like `indent-region-line-by-line'
but additionally keep a running parse state to avoid reparsing the
code repeatedly.  Use `lisp-ppss' to get initial state.
(lisp-indent-line): Take optional PARSE-STATE argument, pass it to
`calculate-lisp-indent', use `lisp-ppss' if not given.
(lisp-mode-variables): Set `indent-region-function' to
`lisp-indent-region'.

7 years agoRemove ignored argument from lisp-indent-line
Noam Postavsky [Thu, 16 Mar 2017 01:59:13 +0000 (21:59 -0400)]
Remove ignored argument from lisp-indent-line

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Remove WHOLE-EXP
argument, the behavior has long since been handled in
`indent-for-tab-command'.  Also remove redundant `beg' and `shift-amt'
variables and use `indent-line-to'.

7 years ago* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.
Noam Postavsky [Thu, 16 Mar 2017 02:35:47 +0000 (22:35 -0400)]
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.

7 years agoDon't reparse the sexp in indent-sexp (Bug#25122)
Noam Postavsky [Mon, 13 Mar 2017 03:59:19 +0000 (23:59 -0400)]
Don't reparse the sexp in indent-sexp (Bug#25122)

* lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Let
PARSE-START be a parse state that can be reused.
(indent-sexp): Pass the running parse state to calculate-lisp-indent
instead of the sexp beginning position.  Saving the
CONTAINING-SEXP-START returned by `calculate-lisp-indent' is no longer
needed.  Don't bother stopping if we don't descend below init-depth,
since we now alway scan the whole buffer (via syntax-ppss) anyway.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp): Add blank
line to test case.

7 years agoAdd cond test cases for singleton clauses.
Vibhav Pant [Sat, 22 Apr 2017 16:21:43 +0000 (21:51 +0530)]
Add cond test cases for singleton clauses.

* test/lisp/emacs-lisp/bytecomp-tests.el: Add test cond forms where
  the default clause is a single non-nil expression.

7 years agob-c--cond-jump-table-info: Use correct body for singleton clauses
Vibhav Pant [Sat, 22 Apr 2017 15:08:53 +0000 (20:38 +0530)]
b-c--cond-jump-table-info: Use correct body for singleton clauses

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info):
When a clause's body consists of a single constant expression, use
that expression as the body to be compiled. This fixes switch bytecode
evaluating to nil to such clauses.

7 years agoffap: Don't switch window unless needed
Philipp Stephani [Sun, 8 Jan 2017 18:44:22 +0000 (19:44 +0100)]
ffap: Don't switch window unless needed

When using ffap-other-window, don't change the window configuration
unless a new buffer has actually been created (Bug#25352).

* lisp/ffap.el (ffap-other-frame): Don't change the window
configuration if no new buffer has been created.
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352): Add unit
test.

7 years agoFix fontification of C++ declaration with type FOO::FOO.
Alan Mackenzie [Sat, 22 Apr 2017 14:45:24 +0000 (14:45 +0000)]
Fix fontification of C++ declaration with type FOO::FOO.

* lisp/progmodes/cc-engine.el (c-find-decl-spots): Initialize
cfd-top-level properly.
(c-forward-decl-or-cast-1): On finding FOO::FOO, check it is followed by "("
before deciding it is a constructor.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Negate the
result of the c-bs-at-toplevel-p call passed to c-font-lock-declarators
(simple bug fix).

7 years agoFix usage of FRAME_Z_GROUP
Philipp Stephani [Sat, 22 Apr 2017 11:54:08 +0000 (13:54 +0200)]
Fix usage of FRAME_Z_GROUP

* src/nsterm.m (initFrameFromEmacs:): FRAME_Z_GROUP does not return a
Lisp object, cf. Bug#26597.

7 years agoFix GNUstep build
Alan Third [Sat, 22 Apr 2017 09:42:35 +0000 (10:42 +0100)]
Fix GNUstep build

* src/nsfns.m (Fns_frame_z_list_order): Rewrite for GNUstep
compatibility.
* src/nsmenu.m (update_frame_tool_bar): Remove unused variable.

7 years agoAdd no-accept-focus and frame-list-z-order to NS port
Alan Third [Thu, 20 Apr 2017 14:25:56 +0000 (15:25 +0100)]
Add no-accept-focus and frame-list-z-order to NS port

* lisp/frame.el (frame-list-z-order): Add NS.
* src/nsfns.m: Add x_set_no_accept_focus to handler struct.
(Fx_create_frame): Handle no-accept-focus parameter.
(ns_window_is_ancestor):
(Fns_frame_list_z_order): New functions.
* src/nsterm.m (x_set_no_accept_focus): New function.
(initFrameFromEmacs): Use EmacsWindow instead of EmacsFSWindow for
non-fullscreen windows.
(EmacsWindow:canBecomeKeyWindow): New function.

7 years ago; Add release notice
Glenn Morris [Fri, 21 Apr 2017 19:27:59 +0000 (15:27 -0400)]
; Add release notice

7 years agoImprove prefix handling for dash.el
Stefan Monnier [Fri, 21 Apr 2017 16:14:59 +0000 (12:14 -0400)]
Improve prefix handling for dash.el

* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload):
Don't drop dash's "-<letter>" prefixes.

7 years ago* lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet
Stefan Monnier [Fri, 21 Apr 2017 16:12:42 +0000 (12:12 -0400)]
* lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet

Revert 0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1 (to fix bug#26325)
and use a different fix for bug#26068.
(cl--symbol-macro-key): New function.
(cl--sm-macroexpand, cl-symbol-macrolet): Use it instead of `symbol-name`.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet):
Failure is not expected any more.

7 years agoAvoid infinite loop in redisplay when header-line-format is invalid
Eli Zaretskii [Fri, 21 Apr 2017 08:10:14 +0000 (11:10 +0300)]
Avoid infinite loop in redisplay when header-line-format is invalid

* src/xdisp.c (handle_invisible_prop): Avoid inflooping when the
string has an invalid %-construct in it and is displayed as part
of mode-line or header-line.  (Bug#26586)

7 years agoAdd tests to check image scaling functionality
Lars Ingebrigtsen [Fri, 21 Apr 2017 04:12:53 +0000 (06:12 +0200)]
Add tests to check image scaling functionality

This is in preparation to doing further work in this area to avoid
regressions.

* test/data/image/blank-200x100.png: New file for testing
image scaling.

* test/manual/image-size-tests.el: New file.

7 years agoAllow svg-image to take all create-image PROPS
Lars Ingebrigtsen [Thu, 20 Apr 2017 21:23:59 +0000 (23:23 +0200)]
Allow svg-image to take all create-image PROPS

* lisp/svg.el (svg-image): Allow passing in PROPS when
creating an image for convenience.

7 years agoTreat non-erroring lisp call as successful eshell command (Bug#26161)
George D. Plymale II [Thu, 20 Apr 2017 18:05:11 +0000 (14:05 -0400)]
Treat non-erroring lisp call as successful eshell command (Bug#26161)

This lets a compound command like 'cd .. && echo ok' print 'ok',
similar to how most other shells behave.

* lisp/eshell/esh-cmd.el (eshell-exit-success-p): Only check if the
last exit code was zero, rather than first checking whether the last
command returned nil.
(eshell-exec-lisp): Set `eshell-last-command-status' to 1 on error.

Copyright-paperwork-exempt: yes

7 years agoFix reading of tab settings in whitespace-mode
Reuben Thomas [Thu, 2 Mar 2017 12:50:06 +0000 (12:50 +0000)]
Fix reading of tab settings in whitespace-mode

lisp/whitespace.el (whitespace-indent-tabs-mode)
whitespace-tab-width): Remove these variables. The underlying
variables `indent-tabs-mode' and `tab-width' are already buffer-local
when needed, and whitespace-mode never changes them.
(whitespace-ensure-local-variables): Remove this function, which only
existed to set the above variables.
(whitespace-cleanup-region, whitespace-regexp)
(whitespace-indentation-regexp, whitespace-report-region)
(whitespace-turn-on, whitespace-color-on): Adjust these functions to
use `indent-tabs-mode' and `tab-width' directly, and not call
`whitespace-ensure-local-variables'.

7 years ago* lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning
Stefan Monnier [Thu, 20 Apr 2017 21:38:21 +0000 (17:38 -0400)]
* lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning

by simplifying ascii-test.

7 years agobytecomp: Don't inline functions that use byte-switch (Bug#26518)
Vibhav Pant [Thu, 20 Apr 2017 15:29:15 +0000 (20:59 +0530)]
bytecomp: Don't inline functions that use byte-switch (Bug#26518)

* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf): Don't inline
  FORM if the bytecode uses the byte-switch instruction. It is
  impossible to guess the correct stack depth while inlining such
  bytecode, resulting in faulty code.

7 years agoSet Emacs version to 25.2 and update AUTHORS file emacs-25.2
Nicolas Petton [Thu, 20 Apr 2017 15:24:06 +0000 (17:24 +0200)]
Set Emacs version to 25.2 and update AUTHORS file

* README: Set Emacs version to 25.2.
* etc/HISTORY: Add release log.
* lisp/ldefs-boot.el:
* etc/AUTHORS:
* ChangeLog.2: Update.

7 years agoDon't register "def" as an autoload prefix (Bug#26412)
Noam Postavsky [Thu, 20 Apr 2017 03:01:43 +0000 (23:01 -0400)]
Don't register "def" as an autoload prefix (Bug#26412)

* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Don't
accept "def" as a prefix.

7 years ago; Move stray item from admin/notes/repo to CONTRIBUTE
Noam Postavsky [Thu, 20 Apr 2017 01:43:05 +0000 (21:43 -0400)]
; Move stray item from admin/notes/repo to CONTRIBUTE

* admin/notes/repo: Remove stray item.
* CONTRIBUTE: Move it here, fix incorrect references to "branch".

7 years agoUse substring completion for Info menus and index
Stefan Monnier [Thu, 20 Apr 2017 00:43:41 +0000 (20:43 -0400)]
Use substring completion for Info menus and index

* lisp/info.el (Info-complete-menu-item): Add `category' metadata.
(Info-menu): Simplify now that we use the `default' arg of completing-read.
* lisp/minibuffer.el (completion-category-defaults): Use substring
completion for `info-menu`.

7 years agoRemove some explicit runtime loads of pcase
Glenn Morris [Wed, 19 Apr 2017 20:32:04 +0000 (16:32 -0400)]
Remove some explicit runtime loads of pcase

Pcase is macros, so these should have used eval-when-compile.
Anyway, pcase entry points are autoloaded, so the compiler handles it.
* lisp/profiler.el, lisp/emacs-lisp/eieio-core.el:
* lisp/emacs-lisp/generator.el, lisp/emacs-lisp/subr-x.el:
* lisp/progmodes/xref.el: No need to require pcase.

7 years agoStop cl-lib loading pcase at runtime
Glenn Morris [Wed, 19 Apr 2017 20:28:48 +0000 (16:28 -0400)]
Stop cl-lib loading pcase at runtime

The cause was an unexpanded pcase-defmacro in cl-loaddefs.
* lisp/emacs-lisp/autoload.el (make-autoload):
Treat pcase-defmacro like defmacro.

7 years agoNote frame documentation exceptions for NS builds
Alan Third [Wed, 19 Apr 2017 19:36:40 +0000 (20:36 +0100)]
Note frame documentation exceptions for NS builds

* doc/lispref/frames.texi (Management Parameters, Child Frames): Note
NS differences.

7 years agoFix bug introduced by my last commit
Alan Third [Wed, 19 Apr 2017 16:58:49 +0000 (17:58 +0100)]
Fix bug introduced by my last commit

* src/nsterm.m (ns_draw_fringe_bitmap): Revert key-mashing accident.

7 years agoAdd new frame functionality to NS port
Alan Third [Fri, 14 Apr 2017 09:02:38 +0000 (10:02 +0100)]
Add new frame functionality to NS port

* lisp/frame.el (frame-restack): Call ns-frame-restack.
* src/keyboard.c (kbd_buffer_get_event) [HAVE_NS]: Enable
MOVE_FRAME_EVENT handling.
* src/frame.h:
* src/frame.c: Enable 'z-group', 'undecorated' and 'parent' frame
definitions.
* src/nsfns.m: Add x_set_z_group, x_set_parent_frame and
x_set_undecorated (Cocoa only) to handler struct.
(Fx_create_frame): Handle 'z-group', 'parent-frame' and 'undecorated'
frame parameter.
(Fns_frame_restack): New function.
* src/nsmenu.m (free_frame_tool_bar, update_frame_tool_bar):
FRAME_TOOLBAR_HEIGHT is no longer a variable.
* src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS, NS_PARENT_WINDOW_TOP_POS):
Add #defines to find the screen position of the parent frame.
(NS_TOP_POS): Remove defun.
(EmacsView): Remove redundant toolbar variables and add createToolbar
method.
(FRAME_NS_TITLEBAR_HEIGHT, FRAME_TOOLBAR_HEIGHT): Always calculate the
values instead of storing them in a variable.
* src/nsterm.m (x_set_offset, windowDidMove): Take parent frame
position into account when positioning frames.
(initFrameFromEmacs): Remove toolbar creation code and handle new
frame parameters.
(x_set_window_size): Remove toolbar height calculation.
(x_set_z_group):
(x_set_parent_frame):
(x_set_undecorated) [NS_IMPL_COCOA]: New function.
(x_destroy_window): Detach parent if child closes.
(updateFrameSize): Change NSTRACE message to reflect new reality and
no longer reset frame size.
(windowWillResize): Don’t change NS window name when the titlebar
is invisible.
(createToolbar): Move toolbar creation code into it’s own method.
(toggleFullScreen): FRAME_TOOLBAR_HEIGHT and FRAME_NS_TITLEBAR_HEIGHT
are no longer variables.
(windowDidMove): Fire MOVE_FRAME_EVENT Emacs event.

7 years ago; CONTRIBUTE: Remove stray header.
Noam Postavsky [Wed, 19 Apr 2017 13:47:35 +0000 (09:47 -0400)]
; CONTRIBUTE: Remove stray header.

7 years agoTweak bytecomp's loading of cl-extra
Glenn Morris [Wed, 19 Apr 2017 00:52:22 +0000 (20:52 -0400)]
Tweak bytecomp's loading of cl-extra

* lisp/emacs-lisp/bytecomp.el: Don't force load of cl-extra in a
post-bootstrap emacs where cl-loaddefs does exist.

7 years agoAvoid unnecessary loading of subr-x at run-time
Glenn Morris [Tue, 18 Apr 2017 23:07:28 +0000 (19:07 -0400)]
Avoid unnecessary loading of subr-x at run-time

* lisp/doc-view.el, lisp/filenotify.el, lisp/info-look.el:
* lisp/svg.el, lisp/emacs-lisp/byte-opt.el, lisp/net/shr.el:
* lisp/textmodes/sgml-mode.el, test/lisp/dom-tests.el:
No need to load subr-x at run-time.
* lisp/gnus/nnheader.el: No need to load subr-x.
; * lisp/emacs-lisp/subr-x.el, lisp/gnus/message.el, lisp/net/nsm.el:
; Comments.

7 years agoUse iteration in math-factorial-iter
michael schuldt [Tue, 18 Apr 2017 18:24:37 +0000 (11:24 -0700)]
Use iteration in math-factorial-iter

* lisp/calc/calc-comb.el (math-factorial-iter):
Use iteration instead of recursion to avoid max-specpdl-size problem.
Copyright-paperwork-exempt: yes

7 years ago* test/lisp/kmacro-tests.el: Require seq, for seq-concatenate.
Glenn Morris [Tue, 18 Apr 2017 17:02:02 +0000 (13:02 -0400)]
* test/lisp/kmacro-tests.el: Require seq, for seq-concatenate.

7 years agoAvoid ert test failures
Glenn Morris [Tue, 18 Apr 2017 16:52:33 +0000 (12:52 -0400)]
Avoid ert test failures

* lisp/emacs-lisp/ert.el (ert--expand-should-1):
Avoid errors related to undefined byte-compile-macro-environment.
Somehow masked until very recently because loading seq (eg)
loads bytecomp.  http://hydra.nixos.org/build/51730765