]> code.delx.au - gnu-emacs/log
gnu-emacs
8 years agoUpdate mod-test-sum-test
Ken Brown [Sun, 29 Nov 2015 16:23:32 +0000 (11:23 -0500)]
Update mod-test-sum-test

* modules/mod-test/test.el (mod-test-sum-test): Update to
accommodate the lack of dladdr on Cygwin.

8 years agoByte compiler: Catch missing argument to `funcall'. Fixes bug#22051.
Alan Mackenzie [Sun, 29 Nov 2015 16:17:07 +0000 (16:17 +0000)]
Byte compiler: Catch missing argument to `funcall'.  Fixes bug#22051.

* lisp/emacs-lisp/bytecomp.el (byte-compile-funcall): When there's no argument
to `funcall', (i) Output an error message; (ii) Generate code to signal a
`wrong-number-of-arguments' error.

8 years ago* lisp/window.el (split-window): Don't sanitize sizes when SIZE is non-nil.
Martin Rudalics [Sun, 29 Nov 2015 09:14:00 +0000 (10:14 +0100)]
* lisp/window.el (split-window): Don't sanitize sizes when SIZE is non-nil.

8 years ago; * modules/mod-test/Makefile: Fix typo.
Ken Brown [Sun, 29 Nov 2015 01:31:17 +0000 (20:31 -0500)]
; * modules/mod-test/Makefile: Fix typo.

8 years ago* lisp/character-fold.el (character-fold-to-regexp)
Artur Malabarba [Sat, 28 Nov 2015 19:56:19 +0000 (19:56 +0000)]
* lisp/character-fold.el (character-fold-to-regexp)

Warn about using long strings.

* test/automated/character-fold-tests.el
(character-fold--test-lax-whitespace)
(character-fold--test-consistency): Reduce string size for tests.

8 years agoDocument renaming of x-select-enable-* variables
Eli Zaretskii [Sat, 28 Nov 2015 18:38:27 +0000 (20:38 +0200)]
Document renaming of x-select-enable-* variables

* doc/emacs/killing.texi (Clipboard): Rename
x-select-enable-clipboard to select-enable-clipboard and
x-select-enable-primary to select-enable-primary.  Update index
entries.

* etc/NEWS: Mark entry as documented.

8 years agoDocument the shorthand hints displayed by M-x
Eli Zaretskii [Sat, 28 Nov 2015 18:27:52 +0000 (20:27 +0200)]
Document the shorthand hints displayed by M-x

* doc/emacs/m-x.texi (M-x): Document the numeric meaning of
suggest-key-bindings.  Document the shorthand hints for commands
that have no key bindings.  Document that M-x completion ignores
obsolete commands.

* etc/NEWS: Move the M-x entry to "Editing Changes" and mark it as
documented.

8 years agoUpdate docs of character folding
Eli Zaretskii [Sat, 28 Nov 2015 17:55:28 +0000 (19:55 +0200)]
Update docs of character folding

* doc/emacs/search.texi (Lax Search): Update the description of
character folding for the latest changes.

8 years ago* lisp/character-fold.el: Also play nice with case-folding
Artur Malabarba [Sat, 28 Nov 2015 15:31:43 +0000 (15:31 +0000)]
* lisp/character-fold.el: Also play nice with case-folding

(character-fold-to-regexp): Take `case-fold-search' into account.

8 years ago* lisp/character-fold.el: Add support for multi-char matches
Artur Malabarba [Sat, 28 Nov 2015 12:15:17 +0000 (12:15 +0000)]
* lisp/character-fold.el: Add support for multi-char matches

(character-fold-table): Now has an extra-slot. This is a second
char-table that holds multi-character matches.  See docstring for
details.
(character-fold-to-regexp): Can build branching regexps when a
character's entry the extra slot of `character-fold-table' matches the
characters that succeed it.

8 years ago* lisp/character-fold.el: Code simplifications
Artur Malabarba [Sat, 28 Nov 2015 10:32:46 +0000 (10:32 +0000)]
* lisp/character-fold.el: Code simplifications

(character-fold-table): Reduce the scope of a variable.
(character-fold-to-regexp): Change logic to work directly on the
input string.  It's a little easier to understand, probably
faster, and sets us up for implementing multi-char matches.

* test/automated/character-fold-tests.el
(character-fold--test-fold-to-regexp): New test.

8 years agoDocument changes in "C-h l"
Eli Zaretskii [Sat, 28 Nov 2015 13:49:05 +0000 (15:49 +0200)]
Document changes in "C-h l"

* doc/emacs/help.texi (Misc Help): Document the changes in "C-h l".

* etc/NEWS: mark "C-h l" changes as documented.

8 years agoFinalize documentation of 'custom-prompt-customize-unsaved-options'
Eli Zaretskii [Sat, 28 Nov 2015 13:43:07 +0000 (15:43 +0200)]
Finalize documentation of 'custom-prompt-customize-unsaved-options'

* doc/emacs/custom.texi (Saving Customizations): Index the new
function 'custom-prompt-customize-unsaved-options'.

* etc/NEWS: Mention when 'custom-prompt-customize-unsaved-options'
is useful.

8 years agoDocument 'comment-line'
Eli Zaretskii [Sat, 28 Nov 2015 13:24:28 +0000 (15:24 +0200)]
Document 'comment-line'

* doc/emacs/programs.texi (Comment Commands): Document
'comment-line'.

* etc/NEWS: Move the entry for 'comment-line' into "Editing Changes".

8 years agoDocument new checkdoc features
Eli Zaretskii [Sat, 28 Nov 2015 12:32:04 +0000 (14:32 +0200)]
Document new checkdoc features

* doc/lispref/tips.texi (Tips, Library Headers): Document the
keyword-checking features of checkdoc and the commands
'checkdoc-file' and 'checkdoc-current-buffer'.

* etc/NEWS: Move the checkdoc-related entries to their own
section.

8 years agoSimplify the prologue of emacs-module.c functions
Philipp Stephani [Sat, 28 Nov 2015 12:08:21 +0000 (14:08 +0200)]
Simplify the prologue of emacs-module.c functions

* emacs-module.c (MODULE_FUNCTION_BEGIN): New macro.
(module_make_global_ref)
(module_free_global_ref, module_make_function, module_funcall)
(module_intern, module_type_of, module_extract_integer)
(module_make_integer, module_extract_float, module_make_float)
(module_copy_string_contents, module_make_string)
(module_make_user_ptr, module_get_user_ptr, module_set_user_ptr)
(module_get_user_finalizer, module_set_user_finalizer)
(module_vec_set, module_vec_get, module_vec_size): Use new helper
macro MODULE_FUNCTION_BEGIN.

8 years agoDon't reject module calls with no arguments
Eli Zaretskii [Sat, 28 Nov 2015 11:59:12 +0000 (13:59 +0200)]
Don't reject module calls with no arguments

* src/emacs-module.c (Finternal_module_call): Allow ARGLIST be nil.

8 years agoMake module-call be visible from Lisp
Philipp Stephani [Sat, 28 Nov 2015 11:53:32 +0000 (13:53 +0200)]
Make module-call be visible from Lisp

* src/emacs-module.c (module_make_function): Use internal--module-call.
(Finternal_module_call): Renamed from Fmodule_call.  Add safety
checks.
(syms_of_module): DEFSYM save-value-p and save-pointer-p.  Do
defsubr internal--module-call.

8 years agoAdd etags tests for the recent Lua-related bugfix
Eli Zaretskii [Sat, 28 Nov 2015 11:11:05 +0000 (13:11 +0200)]
Add etags tests for the recent Lua-related bugfix

* test/etags/lua-src/test.lua: New file, tests the issues raised
by bug#21934.
* test/etags/Makefile (LUASRC): Add test.lua.
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6:
* test/etags/CTAGS.good: Adapt to the new Lua test.  Also, an old
regression fix, resolved around 25 May 2015, required changes to
the "good" ETAGS files.

8 years agoFix Lua tags when a function name includes '.' or ':'
Eli Zaretskii [Sat, 28 Nov 2015 10:29:18 +0000 (12:29 +0200)]
Fix Lua tags when a function name includes '.' or ':'

* lib-src/etags.c (Lua_functions): Add a tag for the last element
of a function name after a dot or a colon.  (Bug#21934)

8 years agoImprove documentation of search and replace commands
Eli Zaretskii [Sat, 28 Nov 2015 09:23:02 +0000 (11:23 +0200)]
Improve documentation of search and replace commands

* doc/emacs/search.texi (Replacement and Lax Matches): Document
which commands are affected by 'replace-character-fold'.
(Lax Search): Add a cross reference to "Replacement and Lax
Matches".  Improve wording.  Fix lost extra whitespace.
(Search Customizations): Improve wording.  (Bug#22036)
See also comments in
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02376.html.

* lisp/replace.el (query-replace, query-replace-regexp)
(query-replace-regexp-eval, replace-string, replace-regexp):
Mention 'replace-character-fold' in the doc strings.

8 years agoFix minor problems found by static checking
Paul Eggert [Sat, 28 Nov 2015 06:08:14 +0000 (22:08 -0800)]
Fix minor problems found by static checking

* src/undo.c (prepare_record): Add proper prototype for C.

8 years ago* src/emacs-module.c (struct env_storage): Delete
Stefan Monnier [Fri, 27 Nov 2015 20:18:29 +0000 (15:18 -0500)]
* src/emacs-module.c (struct env_storage): Delete

(struct emacs_runtime_private): Keep an emacs_env instead.
(Fmodule_load, Fmodule_call): Declare emacs_env_private separately.
(initialize_environment): Split the arg in two.  Adjust all callers.
Only store the private part in Vmodule_environments.
(finalize_environment): Change the arg to only be the private env.
Adjust all callers.

8 years agoImprove documentation of 'replace-character-fold'
Eli Zaretskii [Fri, 27 Nov 2015 20:11:59 +0000 (22:11 +0200)]
Improve documentation of 'replace-character-fold'

* lisp/replace.el (replace-character-fold): Clarify which commands
are affected by this variable.

8 years agoBackport: Add interactive seek command.
Mark Oteiza [Wed, 18 Nov 2015 18:46:24 +0000 (13:46 -0500)]
Backport: Add interactive seek command.

* lisp/mpc.el (mpc-cmd-seekcur): New function.
(mpc-seek-current): New command.
(mpc-mode-menu): Add entry for mpc-seek-current
(mpc-mode-map): Bind mpc-seek-current to "g"

8 years agoAutoload etags when using its xref backend
Dmitry Gutov [Fri, 27 Nov 2015 13:21:44 +0000 (15:21 +0200)]
Autoload etags when using its xref backend

* lisp/progmodes/xref.el (xref--etags-backend):
Rename to etags--xref-backend.  Move to etags.el.  Autoload.
(Bug#22026)

8 years ago* lisp/character-fold.el: Allow complex chars to match their decomposition
Artur Malabarba [Fri, 27 Nov 2015 12:01:12 +0000 (12:01 +0000)]
* lisp/character-fold.el: Allow complex chars to match their decomposition

(character-fold-table): When a character's decomposition does not
involve a formatting tag (i.e., if it has an "exact" description via
other characters), then this character is allowed to match the
decomposition.

8 years ago* lisp/character-fold.el: More descriptive variable names
Artur Malabarba [Fri, 27 Nov 2015 12:00:37 +0000 (12:00 +0000)]
* lisp/character-fold.el: More descriptive variable names

(character-fold-table): Rename a lot of the lexical variables to
make the code easier to read.

8 years ago* lisp/isearch.el: Ensure we still support `isearch-new-word'
Artur Malabarba [Fri, 27 Nov 2015 11:23:35 +0000 (11:23 +0000)]
* lisp/isearch.el: Ensure we still support `isearch-new-word'

(isearch-new-regexp-function): Define variable.
(isearch-new-word): Define as an obsolete alias. (Bug#22018)

8 years agoMerge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
Eli Zaretskii [Fri, 27 Nov 2015 11:11:57 +0000 (13:11 +0200)]
Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25

8 years ago* test/lisp/abbrev-tests.el: Define more tests
Lee Bochicchio [Thu, 26 Nov 2015 06:38:09 +0000 (15:38 +0900)]
* test/lisp/abbrev-tests.el: Define more tests

(abbrev-table-name-test, kill-all-abbrevs-test)
(clear-abbrev-table-test): New tests.

8 years agoAdd module tests for wrong-type-argument
Eli Zaretskii [Fri, 27 Nov 2015 11:11:00 +0000 (13:11 +0200)]
Add module tests for wrong-type-argument

* modules/mod-test/test.el (mod-test-sum-test): Add tests for
wrong-type-argument.

8 years agoImprove handling of signals and 'throw' in modules
Eli Zaretskii [Fri, 27 Nov 2015 10:51:52 +0000 (12:51 +0200)]
Improve handling of signals and 'throw' in modules

* src/emacs-module.c: Add commentary explaining how to write
functions in this file.
(module_make_global_ref, module_free_global_ref)
(module_non_local_exit_signal, module_non_local_exit_throw)
(module_make_function, module_funcall, module_intern)
(module_type_of, module_is_not_nil, module_eq)
(module_extract_integer, module_make_integer)
(module_extract_float, module_make_float)
(module_copy_string_contents, module_make_string)
(module_make_user_ptr, module_get_user_ptr, module_set_user_ptr)
(module_get_user_finalizer, module_set_user_finalizer)
(module_vec_set, module_vec_get, module_vec_size)
(module_non_local_exit_signal_1, module_non_local_exit_throw_1):
Do nothing and return with failure indication immediately, if some
previous module call signaled an error or wants to throw.  See
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02133.html
for the relevant discussions.

8 years agoAdd ':version' tag to 'checkdoc-package-keywords-flag'
Eli Zaretskii [Fri, 27 Nov 2015 10:32:44 +0000 (12:32 +0200)]
Add ':version' tag to 'checkdoc-package-keywords-flag'

* lisp/emacs-lisp/checkdoc.el (checkdoc-package-keywords-flag):
Add a ':version' tag.

8 years agoImprove documentation of 'eval-buffer' and 'eval-region'
Eli Zaretskii [Fri, 27 Nov 2015 10:07:08 +0000 (12:07 +0200)]
Improve documentation of 'eval-buffer' and 'eval-region'

* src/lread.c (Feval_buffer, Feval_region): Doc fixes.  (Bug#22023)

* doc/lispref/eval.texi (Eval): Mention narrowing to clarify
"accessible portion of buffer".

8 years agoUnbreak the Cygwin w32 build
Eli Zaretskii [Fri, 27 Nov 2015 08:01:40 +0000 (10:01 +0200)]
Unbreak the Cygwin w32 build

* src/emacs.c (main): Call w32_init_main_thread in the Cygwin w32
build as well.  Reported by Andy Moreton <andrewjmoreton@gmail.com>.

8 years agoImprove commentary in character-fold.el
Eli Zaretskii [Fri, 27 Nov 2015 07:54:27 +0000 (09:54 +0200)]
Improve commentary in character-fold.el

* lisp/character-fold.el (character-fold-to-regexp): Move detailed
description from commit log message to comments.  (Bug#22019)

8 years agoByte Compiler: generate code to adjust stack count after call to `signal'.
Alan Mackenzie [Thu, 26 Nov 2015 20:57:34 +0000 (20:57 +0000)]
Byte Compiler: generate code to adjust stack count after call to `signal'.

Corrects change from earlier today.

* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): supply the current value of
`byte-compile--for-effect' as argument to `byte-compile-form'.

8 years agoImprove commentary of prepare_to_modify_buffer_1
Eli Zaretskii [Thu, 26 Nov 2015 20:08:54 +0000 (22:08 +0200)]
Improve commentary of prepare_to_modify_buffer_1

* src/insdel.c (prepare_to_modify_buffer_1): Mention in commentary
that this function runs Lisp.  Suggested by Richard Stallman
<rms@gnu.org>.

8 years agoMerge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
Phillip Lord [Thu, 26 Nov 2015 18:09:15 +0000 (18:09 +0000)]
Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25

8 years agoFix regression after merge.
Phillip Lord [Thu, 26 Nov 2015 18:02:29 +0000 (18:02 +0000)]
Fix regression after merge.

 * undo.c (prepare_record): Remove call to run_undoable_change.

8 years agoAfter delete, record point location in undo.
Phillip Lord [Thu, 19 Nov 2015 15:57:55 +0000 (15:57 +0000)]
After delete, record point location in undo.

Addresses Bug #21968.

* lisp/simple.el (undo-auto--add-boundary): Clean up code to
better support intercalating calls.
* src/keyboard.c,src/keyboard.h (command_loop_1): Store value of
point and current buffer before each command.
* src/undo.c (record_point): Now only record the point.
* src/undo.c (prepare_record): Functionality removed form
record_point.
* src/undo.c (record_delete): Check if point needs recording.
* src/undo.c (undo-boundary): Record value of point before each
boundary.
* test/automated/simple-test.el: New tests.

Conflicts:
src/undo.c

8 years agoFix compiler warnings in w32.c
Eli Zaretskii [Thu, 26 Nov 2015 17:53:47 +0000 (19:53 +0200)]
Fix compiler warnings in w32.c

* src/w32.c (sys_socket): In case of error, use -1 as return
value, not INVALID_SOCKET, which causes compiler warnings.
(maybe_load_unicows_dll): Cast the return value of GetProcAddress
to the appropriate function signature, to avoid compiler errors.
Reported by Andy Moreton <andrewjmoreton@gmail.com>.  (Bug#21953)

8 years agoCheck if the file exists on disk before producing the revert diff
Dmitry Gutov [Thu, 26 Nov 2015 15:15:28 +0000 (17:15 +0200)]
Check if the file exists on disk before producing the revert diff

* lisp/vc/vc-dispatcher.el (vc-buffer-sync): Check if the file
exists on disk (bug#20558).

8 years agoByte compiler: on setq with an odd number of arguments, generate a `signal'
Alan Mackenzie [Thu, 26 Nov 2015 10:36:32 +0000 (10:36 +0000)]
Byte compiler: on setq with an odd number of arguments, generate a `signal'

* lisp/emacs-lisp/cconv.el (cconv-convert): Don't transform `setq' form when
it has an odd number of arguments, to allow bytecomp to handle the error.

* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): In a `setq' form with an
odd number of arguments, generate a `signal' instead of the normal code.

8 years ago; Remove outdated comment (bug#22015)
Dmitry Gutov [Thu, 26 Nov 2015 02:44:05 +0000 (04:44 +0200)]
; Remove outdated comment (bug#22015)

8 years agoUse find-tag-default for xref-backend-identifier-at-point
Dmitry Gutov [Thu, 26 Nov 2015 02:38:17 +0000 (04:38 +0200)]
Use find-tag-default for xref-backend-identifier-at-point

* lisp/progmodes/etags.el (find-tag-tag)
(tags-completion-at-point-function): Extract common code as
find-tag--default.
(xref-backend-identifier-at-point): Define in terms of the new
function.

8 years ago* src/undo.c (record_property_change): Remove now-unused local.
Paul Eggert [Thu, 26 Nov 2015 00:14:30 +0000 (16:14 -0800)]
* src/undo.c (record_property_change): Remove now-unused local.

8 years agorun_undoable_changes now called from insdel.
Phillip Lord [Wed, 25 Nov 2015 21:39:49 +0000 (21:39 +0000)]
run_undoable_changes now called from insdel.

The original calls from inside undo.c are not always at a safe position
to call lisp, as they originate in varied positions within insdel.c.
Calling them directly from prepare_to_modify_buffer_1 ensures that they
are always run at the same point.

 * undo.c (run_undoable_changes,syms_of_undo): Remove function
 and symbol used.
 * insdel.c (run_undoable_changes): Add function and symbol.

8 years agoImprove and update documentation of search commands
Eli Zaretskii [Wed, 25 Nov 2015 19:09:29 +0000 (21:09 +0200)]
Improve and update documentation of search commands

* doc/emacs/search.texi (Lax Search): Renamed from "Search Case";
all references changed.  Move the description of lax-whitespace
here.  Add description of the new character folding features and
additional customizable options.
(Isearch Yank): Move before "Error in Search".
(Basic Isearch): Improve wording.  Add index entries.  Add short
description of how to abandon search, making this subsection a
complete introduction to search basics.
(Repeat Isearch): Add index entries.  Describe additional
customizable options.  Describe mouse clicks.
(Isearch Yank): Add index entries.  Describe mouse-2 click in echo
area.  Describe more customizable options.
(Error in Isearch): Add index entries.
(Special Isearch): Move actual description of some isearch
commands to other sections, leaving here just the summary of the
commands.  Add command that toggles character folding.  Describe
commands, like "C-h C-h", that were previously omitted for some
reason.
(Not Exiting Isearch): Describe search-exit-option.  Add index
entries.
(Word Search): Describe eww-search-word and eww-search-prefix.
(Symbol Search): Add index entries.
(Regexp Search): Describe regexp-search-ring-max.
(Replacement and Lax Matches): Renamed from "Replacement and
Case"; all references changed.  Describe lax-whitespace matching
in replace commands and related options.  Describe character
folding in replace commands and related options.
(Query Replace): Describe query-replace-from-to-separator and the
new history features.  Add index entries for highlighted text.
Describe query-replace-skip-read-only.  Describe more keys
accepted by query-replace.
(Other Repeating Search): More index entries for Occur.  Describe
list-matching-lines-default-context-lines.
(Search Customizations): New section, documents customizable
options that were not documented until now.
* doc/emacs/glossary.texi (Glossary): Add "Case Folding" and
"Character Folding".

* etc/NEWS: Move search- and replace-related entries to a single
parent section.

* lisp/replace.el (query-replace-show-replacement): Doc fix.
* lisp/isearch.el (search-nonincremental-instead)
(isearch-hide-immediately): Doc fixes.

8 years agoRemove nnml-retrieve-groups that is unnecessary and somewhat problematic
Katsumi Yamaoka [Wed, 25 Nov 2015 13:47:46 +0000 (13:47 +0000)]
Remove nnml-retrieve-groups that is unnecessary and somewhat problematic

* lisp/gnus/nnml.el (nnml-retrieve-groups): Remove.  See:
<http://thread.gmane.org/gmane.emacs.gnus.general/86308> and
<http://thread.gmane.org/gmane.emacs.gnus.general/86321>

8 years agoFix module_format_fun_env when dynlib_addr fails
Paul Eggert [Wed, 25 Nov 2015 07:43:43 +0000 (23:43 -0800)]
Fix module_format_fun_env when dynlib_addr fails

* src/emacs-module.c (module_format_fun_env):
exprintf doesn’t support %p, so use %x.  Reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02122.html

8 years agoDisambiguate variable help a bit better
Paul Eggert [Wed, 25 Nov 2015 07:15:28 +0000 (23:15 -0800)]
Disambiguate variable help a bit better

* lisp/help-fns.el (describe-variable): Quote the
variable’s value if it is a symbol other than t or nil.
See: T.V Raman in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02147.html

8 years agoPass SVN commit message through log-edit-extract-headers
Dmitry Gutov [Wed, 25 Nov 2015 02:10:24 +0000 (04:10 +0200)]
Pass SVN commit message through log-edit-extract-headers

* lisp/vc/vc-svn.el (vc-svn-checkin): Pass COMMENT through
log-edit-extract-headers (bug#18954).

8 years agoCC Mode: Eliminate compiler warning messages.
Alan Mackenzie [Tue, 24 Nov 2015 22:20:47 +0000 (22:20 +0000)]
CC Mode: Eliminate compiler warning messages.

* lisp/progmodes/cc-mode.el (top level): remove compile time declaration of
`font-lock-syntactic-keywords' (which CC Mode doesn't use).
* lisp/progmodes/cc-awk.el (awk-mode-syntax-table)
(c-awk-set-syntax-table-properties): Clarify comments about
`font-lock-syntactic-keywords'.

* lisp/progmodes/cc-bytecomp.el (cc-bytecomp-load): Create a dummy declaration
of this before the real (interpreted) one, to satisfy the byte compiler.

8 years agoExtend the test suite for json.el
Simen Heggestøyl [Tue, 24 Nov 2015 22:13:30 +0000 (23:13 +0100)]
Extend the test suite for json.el

* lisp/json.el (json-plist-p): Clarify docstring.

* test/automated/json-tests.el (json-tests--with-temp-buffer): New
macro.
(test-json-join, test-json-alist-p)
(test-json-plist-p, test-json-advance, test-json-peek)
(test-json-pop, test-json-skip-whitespace)
(test-json-read-keyword, test-json-encode-keyword)
(test-json-read-number, test-json-encode-number)
(test-json-read-escaped-char, test-json-read-string)
(test-json-encode-string, test-json-encode-key)
(test-json-new-object, test-json-add-to-object)
(test-json-read-object, test-json-encode-list)
(test-json-read-array, test-json-encode-array)
(test-json-read, test-json-read-from-string)
(test-json-encode): New tests.
(json-read-simple-alist): Merged into `test-json-read-object'.
(json-encode-string-with-special-chars): Merged into
`test-json-encode-string'.
(json-read-string-with-special-chars): Split into
`test-json-encode-string' and `test-json-read-from-string'.

8 years agoFixed bug#18283: Enable applescript in NextStep.
Anders Lindgren [Tue, 24 Nov 2015 21:05:05 +0000 (22:05 +0100)]
Fixed bug#18283: Enable applescript in NextStep.

* nextstep/templates/Info.plist.in: Set NSAppleScriptEnabled to YES.

8 years agoAllow completion on dynamic module files in load-library
Eli Zaretskii [Tue, 24 Nov 2015 20:35:11 +0000 (22:35 +0200)]
Allow completion on dynamic module files in load-library

* lisp/files.el (load-library): Bind completion-ignored-extensions
to nil, to allow completion on dynamic modules typed as file
names.  Reported by Andy Moreton <andrewjmoreton@gmail.com>.

8 years agoCC Mode: eliminate almost all byte compilation warnings
Alan Mackenzie [Tue, 24 Nov 2015 19:44:34 +0000 (19:44 +0000)]
CC Mode: eliminate almost all byte compilation warnings

* lisp/progmodes/cc-bytecomp.el (cc-bytecomp-noruntime-functions): Remove.
(cc-require): Remove the crude hack that saved and restored
byte-compile-noruntime-functions.
(cc-conditional-require, cc-conditional-require-after-load): New macros.

* lisp/progmodes/cc-defs.el (top level): Reformulate code which loaded
cc-fix.el using the new macros in cc-bytecomp.el.

* lisp/progmodes/cc-langs.el (c++-template-syntax-table)
(c-no-parens-syntax-table): Add extra "(eval ..)"s around "'(lambda ..)"
forms to remove the superflous quotes.

8 years agoAdd one more mod-test test
Eli Zaretskii [Tue, 24 Nov 2015 19:13:46 +0000 (21:13 +0200)]
Add one more mod-test test

* modules/mod-test/test.el (mod-test-sum-test): Test the error
signaled when the function is invoked with a wrong number of
arguments.

8 years ago* modules/mod-test/mod-test.c (Fmod_test_sum): Verify there are 2 args.
Philipp Stephani [Tue, 24 Nov 2015 19:08:22 +0000 (21:08 +0200)]
* modules/mod-test/mod-test.c (Fmod_test_sum): Verify there are 2 args.

8 years agoImplement dynlib_addr for MS-Windows
Eli Zaretskii [Tue, 24 Nov 2015 19:04:56 +0000 (21:04 +0200)]
Implement dynlib_addr for MS-Windows

* src/dynlib.c [WINDOWSNT]: Include w32common.h.
<g_b_init_get_module_handle_ex> [WINDOWSNT]: New static variable.
(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS)
(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT) [WINDOWSNT]: Define
if undefined.
(dynlib_reset_last_error): Reset g_b_init_get_module_handle_ex to
zero.
(dynlib_addr) [WINDOWSNT]: Non-trivial implementation to report
the full file name of the module for a given address.

8 years agoMerge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25
Alan Mackenzie [Tue, 24 Nov 2015 17:43:52 +0000 (17:43 +0000)]
Merge branch 'emacs-25' of git.sv.gnu.org:/srv/git/emacs into emacs-25

8 years agoSquashed commit of the following:
Alan Mackenzie [Tue, 24 Nov 2015 17:37:49 +0000 (17:37 +0000)]
Squashed commit of the following:

commit e1ecf76585bef2eb87995f7a7f92cc12003a6f70
Author: Alan Mackenzie <acm@muc.de>
Date:   Tue Nov 24 16:50:09 2015 +0000

    Byte compile: minor amendments.

    * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
    add a comment to explain the binding of variables around a subsidiary
    compilation.
    (byte-compile-new-defuns): Amend the doc string.

commit c537bfed1dda1593d218956ff00c6105a3ff0316
Author: Alan Mackenzie <acm@muc.de>
Date:   Sat Nov 21 18:43:57 2015 +0000

    Byte compiler: fix spurious warnings "might not be defined at runtime".

    Also initialize byte-compile-noruntime-functions between runs.

    * lisp/emacs-lisp/bytecomp.el (byte-compile-new-defuns): New variable.
    (byte-compile-initial-macro-environment): For eval-when-compile: bind
    byte-compile-unresolved-functions and byte-compile-new-defuns around
    byte-compile-top-level, to prevent spurious entries being made.
    (byte-compile-warn-about-unresolved-functions): Check whether function is
    in byte-compile-new-defuns before emitting a warning about it.
    (byte-compile-from-buffer): Initialize new variable and
    byte-compile-noruntime-functions to nil.
    (byte-compile-file-form-require): record all new functions defined by a
    `require' in byte-compile-new-defuns.
    (byte-compile-file-form-defmumble): record the new alias in
    byte-compile-new-defuns.

8 years agoFix crash at startup related to GC of font entities
Eli Zaretskii [Tue, 24 Nov 2015 16:08:39 +0000 (18:08 +0200)]
Fix crash at startup related to GC of font entities

* src/font.h (GC_FONT_SPEC_P, GC_FONT_ENTITY_P)
(GC_FONT_OBJECT_P, GC_XFONT_SPEC, GC_XFONT_ENTITY)
(GC_XFONT_OBJECT): New macros, for use in garbage collector.
* src/alloc.c (compact_font_cache_entry, compact_font_caches):
Don't ifdef away font cache compaction on NT_GUI, as the problems
which led to that seem to have been solved.
(compact_font_cache_entry): Use GC_FONT_SPEC_P, GC_XFONT_SPEC,
GC_XFONT_ENTITY, and GC_XFONT_OBJECT, instead of their non-GC_
cousins.  (Bug#21999)

8 years agoByte compile: Output an error, not a warning, for odd number of args to setq
Alan Mackenzie [Tue, 24 Nov 2015 12:40:39 +0000 (12:40 +0000)]
Byte compile: Output an error, not a warning, for odd number of args to setq

* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Amend.

8 years agoFix kbd_buffer iteration loop in readable_events
Ken Raeburn [Tue, 24 Nov 2015 06:16:10 +0000 (01:16 -0500)]
Fix kbd_buffer iteration loop in readable_events

* src/keyboard.c (readable_events): Wrap the event pointer back to the
start of the kbd_buffer array inside the top of the loop instead of
right before checking the loop condition, since kbd_fetch_ptr and
kbd_store_ptr point past the end of the array to mean that element 0
is next. (bug#21935)

8 years agoImprove text-quoting-style doc again
Paul Eggert [Tue, 24 Nov 2015 05:49:25 +0000 (21:49 -0800)]
Improve text-quoting-style doc again

* doc/lispref/help.texi (Keys in Documentation):
Omit overkill discussion of ‘setq’.  Mention Emacs versions
where ‘grave’ style was standard.

8 years agoImprove text-quoting-style doc
Paul Eggert [Tue, 24 Nov 2015 03:22:42 +0000 (19:22 -0800)]
Improve text-quoting-style doc

8 years agoSimplify module_make_function
Paul Eggert [Tue, 24 Nov 2015 03:00:03 +0000 (19:00 -0800)]
Simplify module_make_function

* src/emacs-module.c (module_make_function):
Simplify by calling build_unibyte_string.

8 years agoPort better to FreeBSD’s dlfunc vs dlsym
Paul Eggert [Tue, 24 Nov 2015 02:48:42 +0000 (18:48 -0800)]
Port better to FreeBSD’s dlfunc vs dlsym

This avoids warnings when converting between void * and
function pointers, which strict C11 does not allow.
* configure.ac (dlfunc): Check for existence.
* src/dynlib.c (dlfunc) [!HAVE_DLFUNC]: New macro.
(dynlib_func): New function.
* src/dynlib.h (dynlib_function_ptr, dynlib_func): New decls.
* src/emacs-module.c (Fmodule_load): Use dynlib_func, not
dynlib_sym, for function pointers.

8 years agoSimplify use of emacs_finalizer_function type
Paul Eggert [Tue, 24 Nov 2015 02:35:43 +0000 (18:35 -0800)]
Simplify use of emacs_finalizer_function type

* src/emacs-module.h (emacs_finalizer_function):
Now EMACS_NOEXCEPT.  All users simplified to omit EMACS_NOEXCEPT.
(struct emacs_env_25): Use emacs_finalizer_function where applicable.

8 years agomodule_format_fun_env fixes
Paul Eggert [Mon, 23 Nov 2015 23:45:29 +0000 (15:45 -0800)]
module_format_fun_env fixes

* src/doprnt.c (exprintf) [HAVE_MODULES]: Also define in this case.
* src/emacs-module.c (module_format_fun_env):
Convert path and sym to UTF-8.
Don’t use VLAs, as the C11 standard says they’re optional,
and anyway they can cause core dumps with large allocations.
Use exprintf rather than snprintf, as exprintf handles arbitrarily
long strings.  Simplify the code a bit.

8 years agoDon't use package-user-dir in elisp-library-roots if it's not bound
Dmitry Gutov [Mon, 23 Nov 2015 22:11:51 +0000 (00:11 +0200)]
Don't use package-user-dir in elisp-library-roots if it's not bound

* lisp/progmodes/elisp-mode.el (elisp-library-roots): Don't
use package-user-dir if it's not bound (bug#19759).

8 years agoNew visible-bell for NextStep (OS X El Capitan compatible).
Anders Lindgren [Mon, 23 Nov 2015 21:03:56 +0000 (22:03 +0100)]
New visible-bell for NextStep (OS X El Capitan compatible).

Instead of inverting a rectangle in the middle of the frame, use
the standard NextStep image "caution", represented using an
warning sign with an exclamation mark.  (Bug#21662)

Implemented based on a suggestion drafted by Mustafa Kocaturk.

* src/nsterm.m (EmacsBell): New class for managing the caution
image.  Support multiple active bells, the image is removed once
all bells have timed out.
(ns_timeout): Removed, no longer used.
(ns_ring_bell): Reimplemented to use EmacsBell.

8 years ago* lisp/emacs-lisp/nadvice.el (add-function): Fix debug spec.
Johan Bockgård [Mon, 23 Nov 2015 19:11:10 +0000 (20:11 +0100)]
* lisp/emacs-lisp/nadvice.el (add-function): Fix debug spec.

(remove-function): Ditto. (Bug#20376)

8 years ago* lisp/leim/quail/tamil-dvorak.el: Add necessary escapes.
Mark Oteiza [Mon, 23 Nov 2015 18:10:38 +0000 (13:10 -0500)]
* lisp/leim/quail/tamil-dvorak.el: Add necessary escapes.

8 years agoImprove how non-ASCII strings are accepted from modules
Eli Zaretskii [Mon, 23 Nov 2015 18:08:01 +0000 (20:08 +0200)]
Improve how non-ASCII strings are accepted from modules

* src/emacs-module.c (module_make_function, module_make_string):
Build a unibyte Lisp string and then decode it by UTF-8, instead
of building a multibyte string without decoding.  This is more
tolerant to deviations from UTF-8.

8 years agoPort recent module changes to pickier compilers
Paul Eggert [Mon, 23 Nov 2015 17:53:13 +0000 (09:53 -0800)]
Port recent module changes to pickier compilers

* src/emacs-module.c (module_make_function)
(module_make_string): Add casts to fix pointer signedness issues.

8 years agoFix how strings are accepted from modules
Philipp Stephani [Mon, 23 Nov 2015 17:46:17 +0000 (19:46 +0200)]
Fix how strings are accepted from modules

* emacs-module.c (module_make_function, module_make_string): Use
make_multibyte_string.
(module_copy_string_contents): Encode before reading the byte
size.  Return false if and only if an error occurred.

8 years agoMerge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25
Eli Zaretskii [Mon, 23 Nov 2015 17:41:32 +0000 (19:41 +0200)]
Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emacs into emacs-25

8 years agoAdd the tamil-dvorak input method
Shakthi Kannan [Mon, 23 Nov 2015 17:40:08 +0000 (19:40 +0200)]
Add the tamil-dvorak input method

* lisp/leim/quail/tamil-dvorak.el: New file.  (Bug#21768)

* etc/NEWS: Mention the new input method.

8 years agoMove setting FRAME_WINDOW_SIZES_CHANGED to resize_frame_windows.
Martin Rudalics [Mon, 23 Nov 2015 17:39:18 +0000 (18:39 +0100)]
Move setting FRAME_WINDOW_SIZES_CHANGED to resize_frame_windows.

* src/frame.c (adjust_frame_size): Don't set
FRAME_WINDOW_SIZES_CHANGED here ...
* src/window.c (resize_frame_windows): ... but here, as suggested
by Stefan Monnier.  Also remove some dead code along the way.

8 years ago* /etc/NEWS (Incompatible Lisp Changes): Also `setf' needs an even # of args.
Alan Mackenzie [Mon, 23 Nov 2015 17:20:12 +0000 (17:20 +0000)]
* /etc/NEWS (Incompatible Lisp Changes): Also `setf' needs an even # of args.

8 years agoSignal an error when `setf' gets an odd number of arguments.
Alan Mackenzie [Mon, 23 Nov 2015 17:13:55 +0000 (17:13 +0000)]
Signal an error when `setf' gets an odd number of arguments.

* lisp/emacs-lisp/gv.el (setf): Amend.

8 years ago* lisp/emacs-lisp/smie.el (smie-backward-sexp): Handle BOB better.
Stefan Monnier [Mon, 23 Nov 2015 16:26:16 +0000 (11:26 -0500)]
* lisp/emacs-lisp/smie.el (smie-backward-sexp): Handle BOB better.

8 years ago* etc/NEWS (Incompatible Lisp Changes): Document new restriction on `setq'.
Alan Mackenzie [Mon, 23 Nov 2015 14:59:49 +0000 (14:59 +0000)]
* etc/NEWS (Incompatible Lisp Changes): Document new restriction on `setq'.

8 years agoExpunge occurrences of `setq' with an odd number of arguments.
Alan Mackenzie [Mon, 23 Nov 2015 14:49:23 +0000 (14:49 +0000)]
Expunge occurrences of `setq' with an odd number of arguments.

* lisp/apropos.el (apropos-documentation):
* lisp/obsolete/complete.el (PC-include-file-all-completions):
* lisp/progmodes/compile.el (compilation-goto-locus):
* lisp/vc/vc-cvs.el (vc-cvs-parse-root): (twice)
Insert missing nil at end of `setq' forms.

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): Remove an
erroneous trailing variable name from a setq, thus allowing a compilation
properly to track functions not defined at runtime.

8 years agoAdd a note about a questionable use of bool in xdisp.c
John Wiegley [Mon, 23 Nov 2015 14:42:22 +0000 (06:42 -0800)]
Add a note about a questionable use of bool in xdisp.c

8 years agoIssue a warning from the byte compiler on a malformed `setq' form.
Alan Mackenzie [Mon, 23 Nov 2015 14:25:15 +0000 (14:25 +0000)]
Issue a warning from the byte compiler on a malformed `setq' form.

Partly fixes bug#20241.
* lisp/emacs-lisp/bytecomp.el (byte-compile-setq): Issue a warning when a
`setq' form with an odd number of arguments is compiled.

8 years agoDon't let cconv_convert insert a nil argument into a `setq' form.
Alan Mackenzie [Mon, 23 Nov 2015 14:10:36 +0000 (14:10 +0000)]
Don't let cconv_convert insert a nil argument into a `setq' form.

Fixes bug#21983.
* lisp/emacs-lisp/cconv.el (cconv-convert): Don't silently insert a nil last
argument into a `setq' when there're an odd number of args.  This enables the
byte compiler to issue a message in this case.

8 years agoSignal an error when `setq' has an odd number of arguments. Fixes bug#20241.
Alan Mackenzie [Mon, 23 Nov 2015 13:56:37 +0000 (13:56 +0000)]
Signal an error when `setq' has an odd number of arguments.  Fixes bug#20241.

* src/eval.c (Fsetq): Signal an error on an odd number of arguments.
(syms_of_eval): Add a DEFSYM for Qsetq.

8 years ago* doc/lispref/windows.texi (Window Sizes): Fix indices and references.
Martin Rudalics [Mon, 23 Nov 2015 07:37:45 +0000 (08:37 +0100)]
* doc/lispref/windows.texi (Window Sizes): Fix indices and references.

8 years ago* src/frame.c (adjust_frame_size): Set FRAME_WINDOW_SIZES_CHANGED (Bug#21975).
Martin Rudalics [Mon, 23 Nov 2015 07:19:58 +0000 (08:19 +0100)]
* src/frame.c (adjust_frame_size): Set FRAME_WINDOW_SIZES_CHANGED (Bug#21975).

8 years agoAdd EUDC BBDB 3 entry in NEWS
Thomas Fitzsimmons [Mon, 23 Nov 2015 02:33:48 +0000 (21:33 -0500)]
Add EUDC BBDB 3 entry in NEWS

* NEWS: Mention EUDC BBDB backend support for BBDB 3.

8 years agoImprove EUDC to BBDB 3 export
Thomas Fitzsimmons [Sun, 22 Nov 2015 16:29:13 +0000 (11:29 -0500)]
Improve EUDC to BBDB 3 export

* eudc-vars.el (eudc-ldap-bbdb-conversion-alist): Change phone
entry to single item.  Add company conversion.
* eudc-export.el (eudc-bbdbify-company): New function.
(bbdb-parse-phone): Declare function.
(eudc-bbdbify-phone): Add BBDB 3 support.
(Bug#21971)

8 years agoAdd BBDB 3 support for EUDC export
Thomas Fitzsimmons [Sun, 22 Nov 2015 22:30:50 +0000 (17:30 -0500)]
Add BBDB 3 support for EUDC export

* eudc.el: Add bbdb-version defvar.
(eudc--using-bbdb-3-or-newer-p): New function.
* eudc-export.el (eudc-create-bbdb-record): Add support for
bbdb-create-internal argument list changes introduced in BBDB 3.
* eudcb-bbdb.el: Remove bbdb-version defvar.
(eudc-bbdb-field): Call eudc--using-bbdb-3-or-newer-p.
(Bug#21971)

8 years agoAllow loading modules by 'load-file'
Eli Zaretskii [Sun, 22 Nov 2015 18:38:51 +0000 (20:38 +0200)]
Allow loading modules by 'load-file'

* src/lread.c (Fload): Call 'unbind_to' with 'Fmodule_load' as the
2nd arg, to avoid the "binding stack not balanced" error.
(syms_of_lread) <module-file-suffix>: New Lisp variable.

* lisp/files.el (module-file-suffix): Declare.
(load-file): Remove 'module-file-suffix' from
'completion-ignored-extensions', to allow completion on modules.

* etc/NEWS: Mention 'module-file-suffix'.

8 years agoFix unoptimized builds
Eli Zaretskii [Sun, 22 Nov 2015 18:19:13 +0000 (20:19 +0200)]
Fix unoptimized builds

* src/lisp.h (XTYPE): Move before XSYMBOL, to fix unoptimized
builds.

8 years agoWork around the asynchronous-empty-diff problem
Dmitry Gutov [Sun, 22 Nov 2015 04:59:50 +0000 (06:59 +0200)]
Work around the asynchronous-empty-diff problem

* lisp/vc/vc-rcs.el (vc-rcs-diff):
* lisp/vc/vc-mtn.el (vc-mtn-diff):
* lisp/vc/vc-hg.el (vc-hg-diff):
* lisp/vc/vc-git.el (vc-git-diff): Ignore the ASYNC argument,
do a synchronous process call (bug#21969).