]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoAdd missing dependency to test module source file
Philipp Stephani [Mon, 5 Jun 2017 08:04:20 +0000 (10:04 +0200)]
Add missing dependency to test module source file

7 years agoOmit space that broke ‘make check’
Paul Eggert [Mon, 5 Jun 2017 07:17:05 +0000 (00:17 -0700)]
Omit space that broke ‘make check’

* src/print.c (print_vectorlike): Omit stray space.

7 years agoRemove easserts etc. from emacs-module.c
Paul Eggert [Mon, 5 Jun 2017 06:52:10 +0000 (23:52 -0700)]
Remove easserts etc. from emacs-module.c

Most of these seem to run afoul of the comment "Do NOT use
'eassert' for checking validity of user code in the module."
* src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH)
(module_non_local_exit_check, module_non_local_exit_clear)
(module_non_local_exit_get, module_non_local_exit_signal)
(module_non_local_exit_throw, module_make_string):
Remove unnecessary easserts that pointers are nonnull.
Hardware checks this for us nowadays, and the checks
just clutter up the code.
(module_extract_integer): Remove unnecessary verify that
a C signed integer is in the range INTMAX_MIN..INTMAX_MAX.
The C standard guarantees this.
(module_copy_string_contents): Remove unnecessary eassert
that Lisp strings are null-terminated.
(module_function_arity): Remove unnecessary easserts that
function arities are in range.

7 years agoRemove unnecessary checking in emacs-module.c
Paul Eggert [Mon, 5 Jun 2017 06:52:10 +0000 (23:52 -0700)]
Remove unnecessary checking in emacs-module.c

* src/emacs-module.c (module_copy_string_contents):
Remove checking, as string lengths are always nonnegative and less
than STRING_BYTES_BOUND, and this is checked elsewhere.
(module_make_string): Check length against STRING_BYTES_BOUND, a
tighter bound than MOST_POSITIVE_FIXNUM.  (funcall_module): Don't
assume that an out-of-range integer is nonnegative.

7 years agoSCHARS and STRING_BYTES are nonnegative
Paul Eggert [Mon, 5 Jun 2017 06:52:10 +0000 (23:52 -0700)]
SCHARS and STRING_BYTES are nonnegative

Tell the compiler that SCHARS and STRING_BYTES are nonnegative, in
the hopes that this will optimize a bit better.  Also, check this
at runtime if ENABLE_CHECKING.
* src/lisp.h (SCHARS, STRING_BYTES):
eassume that these functions return nonnegative values.
(STRING_SET_CHARS) [ENABLE_CHECKING]:
eassert that newsize is nonnegative.

7 years ago* lisp/desktop.el (desktop-clear): Skip the daemon's frame (Bug#26912).
Noam Postavsky [Mon, 5 Jun 2017 03:54:51 +0000 (23:54 -0400)]
* lisp/desktop.el (desktop-clear): Skip the daemon's frame (Bug#26912).

7 years agoRemove an unused error symbol
Philipp Stephani [Sun, 4 Jun 2017 17:35:52 +0000 (19:35 +0200)]
Remove an unused error symbol

* src/emacs-module.c (syms_of_module): Remove unused error symbol
'invalid-module-call'.

7 years agoSupport quitting in modules
Philipp Stephani [Sun, 4 Jun 2017 17:34:22 +0000 (19:34 +0200)]
Support quitting in modules

The idea is that modules should call env->should_quit from time to
time and return as quickly as possible if it returns true.

* src/emacs-module.c (module_should_quit): New module function.
(initialize_environment): Use it.
(funcall_module): Process potential pending quit.

* src/eval.c (maybe_quit): Add reference to module_should_quit.

7 years agoUse more specific errors for module load failure
Philipp Stephani [Sun, 4 Jun 2017 17:28:50 +0000 (19:28 +0200)]
Use more specific errors for module load failure

* src/emacs-module.c (syms_of_module): Add more specific error
symbols.
(Fmodule_load): Use them.

7 years agoRemove an unneeded assertion
Philipp Stephani [Sun, 4 Jun 2017 17:26:24 +0000 (19:26 +0200)]
Remove an unneeded assertion

* src/emacs-module.c (module_copy_string_contents): Remove unneeded
assertion.  If this assertion triggers, we raise an error anyway.

7 years agoGuard against signed integer overflows
Philipp Stephani [Sun, 4 Jun 2017 17:22:41 +0000 (19:22 +0200)]
Guard against signed integer overflows

* src/emacs-module.c (module_extract_integer)
(module_copy_string_contents, module_make_string): Guard against
signed integer overflows.

7 years agoAdd a couple more assertions to the module code
Philipp Stephani [Sun, 4 Jun 2017 17:19:30 +0000 (19:19 +0200)]
Add a couple more assertions to the module code

These can help module authors debug crashes.

* emacs-module.c (module_non_local_exit_check)
(module_non_local_exit_clear, module_non_local_exit_get)
(module_non_local_exit_signal, module_non_local_exit_throw)
(module_copy_string_contents, module_make_string)
(funcall_module, initialize_environment): Add assertions

7 years ago; Grammar fix
Philipp Stephani [Sun, 4 Jun 2017 17:16:07 +0000 (19:16 +0200)]
; Grammar fix

7 years ago; Small comment fix
Philipp Stephani [Sun, 4 Jun 2017 17:15:20 +0000 (19:15 +0200)]
; Small comment fix

* emacs-module.c (MODULE_FUNCTION_BEGIN): Don't say that the error
value should be a sentinel value, because in almost all cases it
isn't.

7 years agoUse ATTRIBUTE_MAY_ALIAS where alias violations are likely
Philipp Stephani [Sun, 4 Jun 2017 17:12:23 +0000 (19:12 +0200)]
Use ATTRIBUTE_MAY_ALIAS where alias violations are likely

In particular, alias violations are likely for the return values of
dlsym(3), which get cast around arbitrarily.

* src/emacs-module.c (Fmodule_load): Use ATTRIBUTE_MAY_ALIAS.

7 years agoSimplify interface of dynlib_attr.
Philipp Stephani [Sun, 4 Jun 2017 17:05:46 +0000 (19:05 +0200)]
Simplify interface of dynlib_attr.

Instead of returning bool, set the argument pointers to NULL if the
information is not available.

* src/dynlib.c (dynlib_addr): Don't return bool.

7 years agoRationalize environment lifetime management functions
Philipp Stephani [Sun, 4 Jun 2017 17:02:50 +0000 (19:02 +0200)]
Rationalize environment lifetime management functions

* src/emacs-module.c (Fmodule_load, funcall_module): Adapt callers.
(finalize_environment): Add parameter for public part of the
environment, like 'initialize_environment'.  Add assertions.

7 years agoRework printing of module functions
Philipp Stephani [Sun, 4 Jun 2017 16:57:51 +0000 (18:57 +0200)]
Rework printing of module functions

Fix a FIXME in emacs-module.c.  Put the printing into print.c, like
other types.

* src/print.c (print_vectorlike): Add code to print module functions.

* src/emacs-module.c (funcall_module): Stop calling
'module_format_fun_env'.  Now that module functions are first-class
objects, they can be added to signal data directly.
(module_handle_signal): Remove now-unused function
'module_format_fun_env'.

* test/src/emacs-module-tests.el (mod-test-sum-test): Adapt unit test.

* src/eval.c (funcall_lambda): Adapt call to changed signature of
'funcall_module'.

7 years agoDefine helper macro to reduce code duplication
Philipp Stephani [Sun, 4 Jun 2017 16:50:42 +0000 (18:50 +0200)]
Define helper macro to reduce code duplication

* src/emacs-module.c (MODULE_FUNCTION_BEGIN_NO_CATCH): New helper
macro.
(MODULE_FUNCTION_BEGIN, module_type_of, module_is_not_nil, module_eq):
Use it.

7 years agoRemove two FIXMEs that can't be fixed
Philipp Stephani [Sun, 4 Jun 2017 16:46:23 +0000 (18:46 +0200)]
Remove two FIXMEs that can't be fixed

7 years agoAvoid slow startup in daemon mode when global-linum-mode is on
Eli Zaretskii [Sun, 4 Jun 2017 16:27:13 +0000 (19:27 +0300)]
Avoid slow startup in daemon mode when global-linum-mode is on

* lisp/linum.el (linum-on): Don't turn on linum-mode in a
non-client frame of a daemon session.  (Bug#27210)

7 years agoFix eldoc bug with curved quote
Paul Eggert [Sun, 4 Jun 2017 16:13:15 +0000 (09:13 -0700)]
Fix eldoc bug with curved quote

* lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string):
Substitute quotes in documentation before returning it (Bug#27159).

7 years agoTune ‘format’ after recent fix
Paul Eggert [Sun, 4 Jun 2017 15:39:37 +0000 (08:39 -0700)]
Tune ‘format’ after recent fix

* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat): Format field numbers no longer need
to be unique, reverting the previous doc change since that has
now been fixed.  Also, document that %% should not have modifiers.
* src/editfns.c (styled_format): Improve performance.  Remove
the need for the new prepass over the format string, by using
a typically-more-generous bound for the info array size.
Initialize the info array lazily.  Move string inspection to
the same area to help caching.  Avoid the need for a
converted_to_string bitfield by using EQ.  Cache arg in a
local and avoid some potential aliasing issues to help the
compiler.  Info array is now 0-origin, not 1-origin.

7 years agoImprove of file-local-name use in vc-git-checkin
Nikolay Kudryavtsev [Sun, 4 Jun 2017 07:59:49 +0000 (09:59 +0200)]
Improve of file-local-name use in vc-git-checkin

* lisp/vc/vc-git.el (vc-git-checkin): Use file-local-name only
when calling git commit.

7 years agoSupport a new CSS indentation style
Simen Heggestøyl [Sat, 3 Jun 2017 11:29:06 +0000 (13:29 +0200)]
Support a new CSS indentation style

* lisp/textmodes/css-mode.el (css-smie-rules): Indent after property
immediately followed by a newline.

* test/manual/indent/css-mode.css: Add test for the change above.

* test/manual/indent/scss-mode.scss: Ditto.

7 years ago; Fix off-by-one error
Philipp Stephani [Sat, 3 Jun 2017 09:42:07 +0000 (11:42 +0200)]
; Fix off-by-one error

7 years agoFix a bug when using format field numbers
Philipp Stephani [Sat, 3 Jun 2017 09:16:21 +0000 (11:16 +0200)]
Fix a bug when using format field numbers

Previously styled_format overwrite the argument vector.  This is no
longer possible because there might be more than one specification per
argument.  Use the existing auxiliary info array instead.

* src/editfns.c (styled_format): Record arguments in the info
structure instead of overwriting them.
* test/src/editfns-tests.el (format-with-field): Add unit test.

7 years agoDocument uniqueness limitation of ‘format’
Paul Eggert [Sat, 3 Jun 2017 08:31:04 +0000 (01:31 -0700)]
Document uniqueness limitation of ‘format’

* doc/lispref/strings.texi (Formatting Strings):
* src/editfns.c (Fformat):
Document that field numbers should be unique within a format.

7 years agoSmall rmailmm fix (bug#27203)
Glenn Morris [Sat, 3 Jun 2017 00:42:01 +0000 (20:42 -0400)]
Small rmailmm fix (bug#27203)

* lisp/mail/rmailmm.el (rmail-mime-insert-bulk):
Fall back to HOME if no match in rmail-mime-attachment-dirs-alist.

7 years ago* admin/authors.el (authors-aliases): Addition.
Glenn Morris [Sat, 3 Jun 2017 00:29:34 +0000 (20:29 -0400)]
* admin/authors.el (authors-aliases): Addition.

7 years agoAdd watch for password back to inferior python comint filter
Glenn Morris [Sat, 3 Jun 2017 00:06:12 +0000 (20:06 -0400)]
Add watch for password back to inferior python comint filter

It was removed along with other items for speed (bug#16875),
but doesn't seem to have been causing an issue, and it's useful to
have it there (bug#27154).
* lisp/progmodes/python.el (inferior-python-mode):
Add comint-watch-for-password-prompt to comint-output-filter-functions.

7 years agoUse completing-read-default in tmm-prompt
Ryan [Sat, 3 Jun 2017 00:00:49 +0000 (20:00 -0400)]
Use completing-read-default in tmm-prompt

tmm uses completing-read, but customizes its behavior so much
that any alternative completing-read-function will almost
certainly break it.  For example, both ido-ubiquitous and ivy have
special code to deactivate themselves for tmm.
* lisp/tmm.el (tmm-prompt): Use completing-read-default instead of
completing-read.  (Bug#27193)

Copyright-paperwork-exempt: yes

7 years ago* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL (Bug#20371)
Mats Lidell [Fri, 2 Jun 2017 20:16:01 +0000 (22:16 +0200)]
* etc/tutorials/TUTORIAL.sv: synced with TUTORIAL (Bug#20371)

7 years agoFix with-todo-test
Glenn Morris [Fri, 2 Jun 2017 17:14:44 +0000 (13:14 -0400)]
Fix with-todo-test

* test/lisp/calendar/todo-mode-tests.el (with-todo-test):
HOME should be a directory, not a file.  Delete it when finished.

7 years agoUpdate TUTORIAL.it
Lele Gaifax [Fri, 2 Jun 2017 14:06:55 +0000 (17:06 +0300)]
Update TUTORIAL.it

* etc/tutorials/TUTORIAL.it: Adjust to recent changes in TUTORIAL.

Copyright-paperwork-exempt: yes

7 years ago; * doc/emacs/emacs-xtra.texi: Explain in a comment the purpose of this file.
Eli Zaretskii [Fri, 2 Jun 2017 12:27:55 +0000 (15:27 +0300)]
; * doc/emacs/emacs-xtra.texi: Explain in a comment the purpose of this file.

7 years agoFix cursor position in Dired buffers after dired-sort-toggle
Eli Zaretskii [Fri, 2 Jun 2017 09:53:57 +0000 (12:53 +0300)]
Fix cursor position in Dired buffers after dired-sort-toggle

* src/xdisp.c (display_and_set_cursor): Record cursor coordinates
even if the frame is marked as garbaged.  (Bug#27187)

7 years agoUpdate TUTORIAL.he
Eli Zaretskii [Fri, 2 Jun 2017 06:27:09 +0000 (09:27 +0300)]
Update TUTORIAL.he

* etc/tutorials/TUTORIAL.he: Adjust to recent changes in TUTORIAL.

7 years ago* etc/tutorials/TUTORIAL: Explain how to stop the tutorial (Bug#20371).
Noam Postavsky [Fri, 2 Jun 2017 02:54:09 +0000 (22:54 -0400)]
* etc/tutorials/TUTORIAL: Explain how to stop the tutorial (Bug#20371).

7 years agoLimit format fields to more POSIX-like spec
Paul Eggert [Thu, 1 Jun 2017 23:03:12 +0000 (16:03 -0700)]
Limit format fields to more POSIX-like spec

* doc/lispref/strings.texi (Formatting Strings):
Don’t allow mixing numbered with unnumbered format specs.
* src/editfns.c (styled_format): Don’t bother checking for field 0,
since it doesn’t crash and the behavior is not specified.
* test/src/editfns-tests.el (format-with-field): Adjust tests to
match current doc.  Add more tests for out-of-range fields.

7 years agoImprove performance by avoiding strtoumax
Paul Eggert [Thu, 1 Jun 2017 23:03:12 +0000 (16:03 -0700)]
Improve performance by avoiding strtoumax

This made (string-to-number "10") 20% faster on my old desktop,
an AMD Phenom II X4 910e running Fedora 25 x86-64.
* admin/merge-gnulib (GNULIB_MODULES): Remove strtoumax.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c, m4/strtoull.m4:
* m4/strtoumax.m4: Remove.
* src/editfns.c (str2num): New function.
(styled_format): Use it instead of strtoumax.  Use ptrdiff_t
instead of uintmax_t.  Check for integer overflow.
* src/lread.c (LEAD_INT, DOT_CHAR, TRAIL_INT, E_EXP):
Move to private scope and make them enums.
(string_to_number): Compute integer value directly during
first pass instead of revisiting it with strtoumax later.

7 years agoMinor improvements to format field numbers
Paul Eggert [Thu, 1 Jun 2017 05:09:39 +0000 (22:09 -0700)]
Minor improvements to format field numbers

* src/editfns.c (styled_format): Allow field numbers in a %% spec.
No need for a special diagnostic for field numbers greater than
PTRDIFF_MAX.  Reword diagnostic for field 0.
* test/src/editfns-tests.el (format-with-field): Adjust to match.

7 years agoImplement field numbers in format strings
Philipp Stephani [Wed, 31 May 2017 22:09:43 +0000 (00:09 +0200)]
Implement field numbers in format strings

A field number explicitly specifies the argument to be formatted.
This is especially important for potential localization work, since
grammars of various languages dictate different word orders.

* src/editfns.c (Fformat): Update documentation.
(styled_format): Implement field numbers.

* doc/lispref/strings.texi (Formatting Strings): Document field numbers.

* lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn): Adapt.

* test/src/editfns-tests.el (format-with-field): New unit test.

7 years agoLimit scope of local overriding-terminal-local-map
Alexander Gramiak [Mon, 29 May 2017 19:43:23 +0000 (13:43 -0600)]
Limit scope of local overriding-terminal-local-map

The function `binding' may call isearch-done, which globally sets
overriding-terminal-local-map to nil (Bug#23007).
* lisp/isearch.el (isearch-mouse-2): Don't bind
overriding-terminal-local-map around the call to `binding'.

7 years agoCorrect and isolate the todo-mode test environment
Stephen Berman [Thu, 1 Jun 2017 20:15:50 +0000 (22:15 +0200)]
Correct and isolate the todo-mode test environment

This avoids having to set todo-mode variables globally in the test
file and prevents any exisiting user todo-mode files from influencing
the tests.

* test/lisp/calendar/todo-mode-tests.el:
(with-todo-test): New macro.
(todo-test-todo-quit01, todo-test-todo-quit02)
(todo-test-item-highlighting): Use it.

7 years agoFix build errors on macOS 10.6 (bug#27059)
Alan Third [Tue, 30 May 2017 18:48:17 +0000 (19:48 +0100)]
Fix build errors on macOS 10.6 (bug#27059)

* src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint.

7 years agoImprove testing of octal and hex display of raw bytes
Eli Zaretskii [Thu, 1 Jun 2017 18:29:24 +0000 (21:29 +0300)]
Improve testing of octal and hex display of raw bytes

* test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
(test-redisplay-5): Add a test with a large codepoint.

7 years agoAdd customizable to display raw bytes as hex
Vasilij Schneidermann [Thu, 1 Jun 2017 18:25:58 +0000 (21:25 +0300)]
Add customizable to display raw bytes as hex

* src/xdisp.c (get_next_display_element): Dispatch used format string
for unprintables based on new display-raw-bytes-as-hex variable.
(display-raw-bytes-as-hex): New variable.  (Bug#27122)

* lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.

* doc/emacs/display.texi: Document the new variable.
* etc/NEWS: Mention display-raw-bytes-as-hex.

* test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
(test-redisplay-5): New tests.
(test-redisplay): Call test-redisplay-5.

7 years agoRevert "Add customizable to display raw bytes as hex"
Eli Zaretskii [Thu, 1 Jun 2017 18:24:15 +0000 (21:24 +0300)]
Revert "Add customizable to display raw bytes as hex"

This reverts commit 7c9ac111c5e5d92e620b666893993d5dc562e483.

7 years agoAdd customizable to display raw bytes as hex
Eli Zaretskii [Thu, 1 Jun 2017 18:12:39 +0000 (21:12 +0300)]
Add customizable to display raw bytes as hex

* src/xdisp.c (get_next_display_element): Dispatch used format string
for unprintables based on new display-raw-bytes-as-hex variable.
(display-raw-bytes-as-hex): New variable.  (Bug#27122)

* lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex.

* doc/emacs/display.texi: Document the new variable.
* etc/NEWS: Mention display-raw-bytes-as-hex.

* test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
(test-redisplay-5): New tests.
(test-redisplay): Call test-redisplay-5.

7 years agoFix linum under text-scaling when leuven-theme is used
Eli Zaretskii [Thu, 1 Jun 2017 14:55:25 +0000 (17:55 +0300)]
Fix linum under text-scaling when leuven-theme is used

* etc/themes/leuven-theme.el (linum): Make the 'linum' face
inherit from 'default' and 'shadow', so that margins are enlarged
as expected under text-scaling.

7 years ago; Auto-commit of loaddefs files.
Glenn Morris [Thu, 1 Jun 2017 10:26:41 +0000 (06:26 -0400)]
; Auto-commit of loaddefs files.

7 years agoFree cwd when no longer needed
Paul Eggert [Thu, 1 Jun 2017 05:38:04 +0000 (22:38 -0700)]
Free cwd when no longer needed

* lib-src/emacsclient.c (main): Don’t dally when freeing cwd.

7 years agoFix memory leak of cwd string in emacsclient (Bug#26628)
Anders Waldenborg [Sun, 23 Apr 2017 19:15:46 +0000 (21:15 +0200)]
Fix memory leak of cwd string in emacsclient (Bug#26628)

* lib-src/emacsclient.c (main): emacsclient retrieves the current
working directory using get_current_dir_name which returns a newly
allocated string.  Make sure this string is freed before exiting.

Copyright-paperwork-exempt: yes

7 years ago; CONTRIBUTE: Better example for multi-entry example ChangeLog
Noam Postavsky [Thu, 11 May 2017 03:27:37 +0000 (23:27 -0400)]
; CONTRIBUTE: Better example for multi-entry example ChangeLog

The new example has entries spanning multiple functions in a single
file as well as multiple files.

7 years agoQuieten compilation of some test files
Glenn Morris [Thu, 1 Jun 2017 01:17:28 +0000 (21:17 -0400)]
Quieten compilation of some test files

* test/lisp/dired-tests.el (dired-test-bug25609): Mark unused args.
* test/src/data-tests.el (binding-test-set-constant-t)
(binding-test-set-constant-nil, binding-test-set-constant-keyword)
(binding-test-set-constant-nil): Silence compiler.
* test/src/regex-tests.el (regex-tests-BOOST): Escape char literal.

7 years agoUse true names for invocation- and source-directory
Glenn Morris [Thu, 1 Jun 2017 01:13:40 +0000 (21:13 -0400)]
Use true names for invocation- and source-directory

* src/emacs.c (init_cmdargs) <Vinvocation_directory>:
* src/lread.c (init_lread) <Vsource_directory>: Use true names.

7 years agoAvoid elisp-mode test failures when source dir has multiple names
Glenn Morris [Thu, 1 Jun 2017 01:11:47 +0000 (21:11 -0400)]
Avoid elisp-mode test failures when source dir has multiple names

* test/lisp/progmodes/elisp-mode-tests.el (emacs-test-dir):
Use the true name of the directory.

7 years agoFix bug with "%%" in error format
Paul Eggert [Wed, 31 May 2017 23:50:08 +0000 (16:50 -0700)]
Fix bug with "%%" in error format

* src/doprnt.c (doprnt): Format "%%" correctly.
Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00901.html

7 years ago* src/editfns.c (Fmessage): Improve doc string (Bug#23425#130).
Paul Eggert [Wed, 31 May 2017 23:22:24 +0000 (16:22 -0700)]
* src/editfns.c (Fmessage): Improve doc string (Bug#23425#130).

7 years agoRevert mml-generate-mime-1 (bug#27141)
Katsumi Yamaoka [Wed, 31 May 2017 23:21:27 +0000 (23:21 +0000)]
Revert mml-generate-mime-1 (bug#27141)

* lisp/gnus/mml.el (mml-generate-mime-1): Reverted to emacs-25 version
with slight modernizations (bug#27141).

7 years agoFix Bug#27108
Michael Albinus [Wed, 31 May 2017 18:32:31 +0000 (20:32 +0200)]
Fix Bug#27108

* lisp/recentf.el (recentf-load-list): Bind `non-essential',
in order to avoid Tramp password requests during Emacs
startup.  (Bug#27108)

7 years ago* test/Makefile.in (.SECONDARY): Stop make deleting .elc files.
Glenn Morris [Wed, 31 May 2017 16:56:40 +0000 (12:56 -0400)]
* test/Makefile.in (.SECONDARY): Stop make deleting .elc files.

7 years agoDocument current-line hscrolling in ELisp manual
Eli Zaretskii [Wed, 31 May 2017 16:15:40 +0000 (19:15 +0300)]
Document current-line hscrolling in ELisp manual

* doc/lispref/windows.texi (Horizontal Scrolling): Document the
new mode of auto-hscrolling only the current line.

7 years agoSupport lower bound on hscrolling when only current line scrolls
Eli Zaretskii [Wed, 31 May 2017 16:01:31 +0000 (19:01 +0300)]
Support lower bound on hscrolling when only current line scrolls

* doc/emacs/display.texi (Horizontal Scrolling): Document the new
mode of auto-hscrolling only the current line.

* src/xdisp.c (init_iterator): When hscrolling only the
current line, apply the window's min_hscroll here, so that
non-current lines will be hscrolled by that minimum.
Suggested by Stephen Berman <stephen.berman@gmx.net>.
(hscroll_window_tree): Account for window's min_hscroll when
deciding whether to recompute the hscroll.
(display_line): Subtract window's min_hscroll from x_incr, as that
was already accounted for in init_iterator.  (Bug#27008)

7 years agocl-print: handle circular objects when `print-circle' is nil (Bug#27117)
Noam Postavsky [Sun, 28 May 2017 21:01:05 +0000 (17:01 -0400)]
cl-print: handle circular objects when `print-circle' is nil (Bug#27117)

* lisp/emacs-lisp/cl-print.el (cl-print--currently-printing): New variable.
(cl-print-object): When `print-circle' is nil, bind it to a list of
objects that are currently printing to avoid printing the same object
endlessly.
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle): New test.

7 years agoFurther simplify test/Makefile, optionally load elc tests
Noam Postavsky [Wed, 31 May 2017 03:31:18 +0000 (23:31 -0400)]
Further simplify test/Makefile, optionally load elc tests

* test/Makefile.in: Use make's error ignoring feature instead of
suppressing test errors with shell.  Compile test files in the main
make invocation instead of a recursive 'make' call.  Optionally load
.elc test files if TEST_LOAD_EL is set to something other than 'yes'.
Remove obsolete commentary.

7 years agoAvoid inflooping in redisplay due to Spacemacs and linum-mode
Eli Zaretskii [Wed, 31 May 2017 09:05:06 +0000 (12:05 +0300)]
Avoid inflooping in redisplay due to Spacemacs and linum-mode

* src/xdisp.c (redisplay_internal): Limit the number of redisplay
retries when a frame becomes garbaged as result of redisplaying
it.  (Bug#27115)

7 years ago* src/editfns.c (decode-time): Fix docstring.
Tino Calancha [Wed, 31 May 2017 01:15:20 +0000 (10:15 +0900)]
* src/editfns.c (decode-time): Fix docstring.

7 years ago* admin/update_autogen: Remove bzr support.
Glenn Morris [Wed, 31 May 2017 01:03:16 +0000 (21:03 -0400)]
* admin/update_autogen: Remove bzr support.

7 years agoAvoid subr test failure when source dir has multiple names
Glenn Morris [Wed, 31 May 2017 01:01:56 +0000 (21:01 -0400)]
Avoid subr test failure when source dir has multiple names

* test/lisp/subr-tests.el (subr-tests--this-file):
Use the true name of the file.  The following test does a string
comparison of this value with that from method-files, which uses
load-history, which contains true names.

7 years agoExtract eldoc--supported-p
Dmitry Gutov [Tue, 30 May 2017 22:29:34 +0000 (01:29 +0300)]
Extract eldoc--supported-p

* lisp/emacs-lisp/eldoc.el (eldoc--supported-p): New function.
(turn-on-eldoc-mode, eldoc-mode): Use it.
(http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00865.html)

7 years agoMake "make check" less verbose by default
Glenn Morris [Tue, 30 May 2017 18:16:35 +0000 (14:16 -0400)]
Make "make check" less verbose by default

* test/Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_ELC, am__v_ELC_)
(am__v_ELC_0, am__v_ELC_1, AM_V_GEN, am__v_GEN_, am__v_GEN_0)
(am__v_GEN_1, AM_V_at, am__v_at_, am__v_at_0, am__v_at_1):
New, copied from lisp/Makefile.in.
(%.elc, %.log): Simplify and quieten.

7 years agoMode line "%q" construct: Just use one number when both would be the same.
Alan Mackenzie [Tue, 30 May 2017 17:42:52 +0000 (17:42 +0000)]
Mode line "%q" construct: Just use one number when both would be the same.

* src/xdisp (decode_mode_spec): recode the "%q" bit appropriately.

7 years agoMerge branch 'master' of /home/acm/emacs/emacs.git/master
Alan Mackenzie [Tue, 30 May 2017 17:39:40 +0000 (17:39 +0000)]
Merge branch 'master' of /home/acm/emacs/emacs.git/master

7 years agoc-defun-name: Return fully qualified method names when wanted in C++, etc.
Alan Mackenzie [Tue, 30 May 2017 17:07:12 +0000 (17:07 +0000)]
c-defun-name: Return fully qualified method names when wanted in C++, etc.

* lisp/progmodes/cc-cmds.el (c-defun-name): Use
c-back-over-compound-identifier in place of c-backward-token-2 near the end
of the function.

7 years agoReduce scope of recent test/Makefile HOME change
Glenn Morris [Tue, 30 May 2017 16:50:54 +0000 (12:50 -0400)]
Reduce scope of recent test/Makefile HOME change

* test/Makefile.in (%.log): Move setting of HOME here from top-level.

7 years agoSkip .#* temporaries when finding sources
Paul Eggert [Tue, 30 May 2017 16:27:33 +0000 (09:27 -0700)]
Skip .#* temporaries when finding sources

Without this patch, ‘make check’ can fail with the diagnostic
‘invalid syntax in conditional’ if there is an Emacs temporary
file whose name starts with ‘.#’, because the ‘#’ is treated as
the start of a Make comment.
* lisp/Makefile.in (loaddefs, tagsfiles, check-defun-deps):
* test/Makefile.in (ELFILES):
Skip files starting with ‘.’, so that the .#* files do not cause
trouble.  (We cannot easily skip just files starting with ‘.#’,
since ‘#’ starts a Make comment!)

7 years agoMerge branch 'master' of /home/acm/emacs/emacs.git/master
Alan Mackenzie [Tue, 30 May 2017 16:27:36 +0000 (16:27 +0000)]
Merge branch 'master' of /home/acm/emacs/emacs.git/master

7 years agoFix the mouse help/key map on the "%p" part of the mode line.
Alan Mackenzie [Tue, 30 May 2017 16:21:31 +0000 (16:21 +0000)]
Fix the mouse help/key map on the "%p" part of the mode line.

* lisp/bindings.el (mode-line-percent-position): give it a
`risky-local-variable' property.
(mode-line-position): correct the quoting on the mode-line-percent-position
part of the variable, allowing the properties to be properly recognized.

7 years agoFix the mouse help/key map on the "%p" part of the mode line.
Alan Mackenzie [Tue, 30 May 2017 16:21:31 +0000 (16:21 +0000)]
Fix the mouse help/key map on the "%p" part of the mode line.

* lisp/bindings.el (mode-line-percent-position): give it a
`risky-local-variable' property.
(mode-line-position): correct the quoting on the mode-line-percent-position
part of the variable, allowing the properties to be properly recognized.

7 years agoMerge from gnulib
Paul Eggert [Tue, 30 May 2017 16:15:05 +0000 (09:15 -0700)]
Merge from gnulib

* build-aux/config.guess: Copy from gnulib.
* lib/gnulib.mk.in: Regenerate.

7 years agoStop make check interacting with HOME
Glenn Morris [Tue, 30 May 2017 15:39:39 +0000 (08:39 -0700)]
Stop make check interacting with HOME

* test/Makefile.in (HOME): Export a non-existent value.

7 years ago; Spelling fixes for "SpamAssassin"
Paul Eggert [Tue, 30 May 2017 15:28:54 +0000 (08:28 -0700)]
; Spelling fixes for "SpamAssassin"

7 years agoUpdate .gitattributes to match sources better
Paul Eggert [Tue, 30 May 2017 15:22:27 +0000 (08:22 -0700)]
Update .gitattributes to match sources better

* .gitattributes: Remove nt/nmake.defs.  Move dostorture.c, c.C,
algrthms.html.  Use pattern for todo-mode.  Improve patterns for
Ada, C, ObjC, shell.  Add Pascal.  Remove unused pattern *.ruby.
Add config.guess and config.sub as shell files.

7 years agoRename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon'
Noam Postavsky [Tue, 30 May 2017 02:13:53 +0000 (22:13 -0400)]
Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon'

* doc/emacs/cmdargs.texi (Initial Options):
* doc/lispref/os.texi (Startup Summary):
* etc/NEWS:
* etc/emacs.service:
* src/emacs.c (main):
* src/lisp.h: Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to
'--bg-daemon'.

7 years agotodo-mode: don't assume an ordering of tests
Glenn Morris [Tue, 30 May 2017 00:50:36 +0000 (17:50 -0700)]
todo-mode: don't assume an ordering of tests

* test/lisp/calendar/todo-mode-tests.el (todo-test-todo-quit02)
(todo-test-item-highlighting): Avoid prompting for input file.

7 years agoImprove .gdbinit Lisp value pretty-printing
Paul Eggert [Tue, 30 May 2017 00:15:11 +0000 (17:15 -0700)]
Improve .gdbinit Lisp value pretty-printing

* src/.gdbinit (to_string): Use an unsigned representation for
Lisp values, as requested by Eli Zaretskii (Bug#27098).
Also, use "make_number(N)" for Lisp integers.

7 years agoTurn global-eldoc-mode into a globalized minor mode
Dmitry Gutov [Mon, 29 May 2017 23:55:28 +0000 (02:55 +0300)]
Turn global-eldoc-mode into a globalized minor mode

* lisp/emacs-lisp/eldoc.el (global-eldoc-mode):
Turn into globalized mode (bug#19853).
(turn-on-eldoc-mode): Make it into a wrapper instead of alias.
(eldoc-mode): Only show the message when called interactively.

7 years agoUse regexp matching instead of checking exit status
Dmitry Gutov [Mon, 29 May 2017 21:58:39 +0000 (00:58 +0300)]
Use regexp matching instead of checking exit status

* lisp/progmodes/xref.el (xref-collect-matches):
See if the output buffer contents look like Grep output
instead of checking exit status (bug#23451).

7 years agoAdd initial tests for todo-mode.el
Stephen Berman [Mon, 29 May 2017 21:49:41 +0000 (23:49 +0200)]
Add initial tests for todo-mode.el

*test/lisp/calendar/todo-mode-tests.el:
*test/lisp/calendar/todo-mode-resources/todo-test-1.toda:
*test/lisp/calendar/todo-mode-resources/todo-test-1.todo: New files.

* .gitattributes: Ignore trailing whitespace in todo-mode test
data files, since it is part of the todo-mode file format.

7 years agoMake `todo-toggle-item-highlighting' work on multiline items (bug#27133)
Stephen Berman [Mon, 29 May 2017 18:26:49 +0000 (20:26 +0200)]
Make `todo-toggle-item-highlighting' work on multiline items (bug#27133)

* lisp/calendar/todo-mode.el (todo-hl-line-range): New named function,
replacing an anonymous function for the sake of `describe-variable'.
(todo-modes-set-2): Use it as buffer-local value of hl-line-range-function
and remove boundp test of this variable, so its value is available on
invoking `todo-toggle-item-highlighting'.

7 years agoFix build error on macOS 10.6
Alan Third [Mon, 29 May 2017 16:01:44 +0000 (17:01 +0100)]
Fix build error on macOS 10.6

* src/nsfns.m (compute_tip_xy): Cast NSRect to CGRect and NSPoint to
CGPoint.

7 years ago; Fix backslashes in python-tests
Noam Postavsky [Mon, 22 May 2017 16:36:20 +0000 (12:36 -0400)]
; Fix backslashes in python-tests

* test/lisp/progmodes/python-tests.el (python-indent-after-backslash-1)
(python-indent-after-backslash-2)
(python-indent-after-backslash-3)
(python-indent-after-backslash-4)
(python-indent-after-backslash-5)
(python-nav-beginning-of-statement-1)
(python-nav-end-of-statement-1)
(python-nav-forward-statement-1)
(python-nav-backward-statement-1)
(python-nav-backward-statement-2)
(python-info-statement-starts-block-p-2)
(python-info-statement-ends-block-p-2)
(python-info-beginning-of-statement-p-2)
(python-info-end-of-statement-p-2)
(python-info-beginning-of-block-p-2)
(python-info-end-of-block-p-2)
(python-info-line-ends-backslash-p-1)
(python-info-beginning-of-backslash-1)
(python-info-continuation-line-p-1)
(python-info-block-continuation-line-p-1)
(python-info-assignment-statement-p-1)
(python-info-assignment-continuation-line-p-1): Backslashes in
literals should be doubled only once to produce one backslash in the
buffer.  If there backslashes inside a Python string literal in a Lisp
literal, that would need to be doubled twice, but there are no such
cases.  Note that `python-tests-looking-at' takes a plain string, not
a regexp.

7 years ago; Update test for previous change
Noam Postavsky [Mon, 22 May 2017 16:32:04 +0000 (12:32 -0400)]
; Update test for previous change

* test/lisp/progmodes/python-tests.el
(python-indent-after-backslash-4): Indent after backslash is now
python-indent-offset.

7 years agoComply with pep 8 style guide for backslash in assignment (Bug#24809)
Jules Tamagnan [Thu, 27 Oct 2016 22:03:31 +0000 (15:03 -0700)]
Comply with pep 8 style guide for backslash in assignment (Bug#24809)

* lisp/progmodes/python.el (python-indent--calculate-indentation):
Increase indent by `python-indent-offset' after
`:after-backslash-assignment-continuation'.

Copyright-paperwork-exempt: yes

7 years agoAdd suggestion to docstring
Wilfred Hughes [Mon, 29 May 2017 00:04:41 +0000 (01:04 +0100)]
Add suggestion to docstring

* lisp/subr.el (interactive-p): Mention commandp, as this is often
  what users are actually looking for.

7 years agoEnsure button-get works in any buffer
Wilfred Hughes [Mon, 29 May 2017 00:00:05 +0000 (01:00 +0100)]
Ensure button-get works in any buffer

* lisp/button.el (button-get): Previously we assumed that button-get
  was called in the buffer containing the button.  In other buffers,
  button-get always returned nil.  Fix this by passing the relevant
  buffer from the marker.

7 years agoSignal error if find-grep returns a nonzero status
Dmitry Gutov [Sun, 28 May 2017 23:55:42 +0000 (02:55 +0300)]
Signal error if find-grep returns a nonzero status

* lisp/progmodes/xref.el (xref-collect-matches): Signal error
if find-grep returns a nonzero status (bug#23451).  Remove the
comment: even if some output is present, a non-zero status
means something went wrong and it can't be relied upon.

7 years agoMake sure exiting todo-mode buffer buries it (bug#27121)
Stephen Berman [Sun, 28 May 2017 20:52:05 +0000 (22:52 +0200)]
Make sure exiting todo-mode buffer buries it (bug#27121)

This failed due to commit ea3ae33b from 2013-05-16, which prevented
quitting todo-mode buffer after visiting todo-archive buffer from
making the archive buffer current again.  Avoid this now by simply
killing the archive buffer, since there's no need to keep it a live
buffer.  Consequently, quitting a todo-mode buffer can now use
bury-buffer without an argument, which ensures that is will not
becomes current on quitting the buffer that replaced it in the window.

* lisp/calendar/todo-mode.el (todo-quit): Kill todo-archive-mode
buffer instead of burying it.  This now allows exiting the
todo-mode buffer by bury-buffer without an argument, so do that.