]> git.eshelyaron.com Git - emacs.git/log
emacs.git
9 years agoFix documentation and implementation of 'directory-name-p'
Eli Zaretskii [Thu, 3 Dec 2015 14:59:42 +0000 (16:59 +0200)]
Fix documentation and implementation of 'directory-name-p'

* lisp/files.el (directory-name-p): Modify to recognize
backslashes on MS-Windows and MS-DOS.  Adjust the doc string
accordingly.  Use '=', not char-equal, for comparison, as
letter-case cannot possibly be an issue here.

* doc/lispref/files.texi (Directory Names): Move the documentation
of directory-name-p here from "Relative File Names".  Update the
description per the changes in implementation.

* etc/NEWS: Move the entry for 'directory-name-p' to its proper
place and mark it documented.

9 years agoMinor copyedit in Emacs manual
Eli Zaretskii [Wed, 2 Dec 2015 14:09:24 +0000 (16:09 +0200)]
Minor copyedit in Emacs manual

* doc/emacs/search.texi (Lax Search): Make wording about character
folding by default less definitive.  (Bug#22043)

9 years agoMore emacs-module.c fixes for wide ints
Eli Zaretskii [Wed, 2 Dec 2015 14:06:01 +0000 (16:06 +0200)]
More emacs-module.c fixes for wide ints

* src/emacs-module.c (value_to_lisp) [WIDE_EMACS_INT]: Use
unsigned data types to manipulate pointers, to avoid sign
extension coming after us with a vengeance.

* modules/mod-test/test.el (mod-test-sum-test): Add tests for
Emacs with wide ints that verify integer values near the critical
value that requires us to switch to a cons cell.

9 years agoFix bug#22069 in cl-generic.el
Stephen Leake [Wed, 2 Dec 2015 12:25:12 +0000 (06:25 -0600)]
Fix bug#22069 in cl-generic.el

* lisp/emacs-lisp/cl-generic.el (cl-no-method): Remove %S; this string is
not run thru `format'.

9 years agoAPPEND etags--xref-backend to xref-backend-functions
Dmitry Gutov [Wed, 2 Dec 2015 02:12:03 +0000 (04:12 +0200)]
APPEND etags--xref-backend to xref-backend-functions

* lisp/progmodes/xref.el (xref-backend-functions):
Use APPEND when adding the default element
(http://lists.gnu.org/archive/html/emacs-devel/2015-12/msg00061.html).

9 years agoMore accurate documentation of lax whitespace matching
Eli Zaretskii [Tue, 1 Dec 2015 19:29:14 +0000 (21:29 +0200)]
More accurate documentation of lax whitespace matching

* lisp/isearch.el (isearch-forward-word, isearch-forward-symbol)
(word-search-backward, word-search-forward)
(word-search-backward-lax, word-search-forward-lax): Mention in
doc strings that toggling lax whitespace matching has no effect on
these commands.

* doc/emacs/search.texi (Word Search, Symbol Search): Clarify that
lax whitespace matching has no effect on these commands.

9 years agoFix emacs-module.c for wide ints
Eli Zaretskii [Tue, 1 Dec 2015 18:34:12 +0000 (20:34 +0200)]
Fix emacs-module.c for wide ints

* src/emacs-module.c (lisp_to_value): Compare the produced value
with the original Lisp object, not with the one potentially
converted into a Lisp_Cons.  Fixes assertion violations when
working with integers larger than fit into a 32-bit value.

* modules/mod-test/test.el (mod-test-sum-test): Add tests for
large integers, to test --with-wide-int.

9 years agoDocument 'directory-files-recursively'
Eli Zaretskii [Tue, 1 Dec 2015 16:16:22 +0000 (18:16 +0200)]
Document 'directory-files-recursively'

* lisp/files.el (directory-files-recursively): Doc fix.  Rename
the argument MATCH to REGEXP, to be more explicit about its form.

* doc/lispref/files.texi (Contents of Directories): Improve the
documentation of 'directory-files-recursively'.  Add
cross-references.

* etc/NEWS: Move the entry for 'directory-files-recursively' to
its place and mark it documented.

9 years agoDocument 'inhibit-read-only' property
Eli Zaretskii [Tue, 1 Dec 2015 16:11:11 +0000 (18:11 +0200)]
Document 'inhibit-read-only' property

* doc/lispref/text.texi (Special Properties): Describe the new
'inhibit-read-only' text property.  Add cross-reference to where
read-only buffers are described.
* doc/lispref/buffers.texi (Read Only Buffers): Mention that
'inhibit-read-only' property exempts text from being read-only.
Add cross-reference to "Special Properties".

* etc/NEWS: Move the entry about 'inhibit-read-only' property to
its place and mark it documented.

9 years ago* lisp/emacs-lisp/package.el: Update header comments
Artur Malabarba [Tue, 1 Dec 2015 15:11:33 +0000 (15:11 +0000)]
* lisp/emacs-lisp/package.el: Update header comments

9 years ago* lisp/character-fold.el: Add back multi-char matching
Artur Malabarba [Tue, 1 Dec 2015 13:52:50 +0000 (13:52 +0000)]
* lisp/character-fold.el: Add back multi-char matching

(character-fold-to-regexp): Uncomment recently commented code
and make the algorithm "dummer" by not checking every possible
combination.  This will miss some possible matches, but it
greatly reduces regexp size.

* test/automated/character-fold-tests.el
(character-fold--test-fold-to-regexp): Comment out test of
functionality no longer supported.

9 years ago* doc/emacs/ack.texi (Acknowledgments): Update.
Xue Fuqiao [Tue, 1 Dec 2015 13:21:18 +0000 (21:21 +0800)]
* doc/emacs/ack.texi (Acknowledgments): Update.

9 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 1 Dec 2015 12:18:24 +0000 (07:18 -0500)]
; Auto-commit of loaddefs files.

9 years agoCheck `file-remote-p' over absolute files names in files.el
Michael Albinus [Tue, 1 Dec 2015 12:12:18 +0000 (13:12 +0100)]
Check `file-remote-p' over absolute files names in files.el

* lisp/files.el (directory-files-recursively)
(get-free-disk-space): Check `file-remote-p' over absolute files names.

9 years ago * src/lread.c (syms_of_lread): Doc fix.
Andreas Schwab [Tue, 1 Dec 2015 10:41:07 +0000 (11:41 +0100)]
* src/lread.c (syms_of_lread): Doc fix.

9 years agoDon't mistake certain JS method calls for keywords
Dmitry Gutov [Tue, 1 Dec 2015 03:40:57 +0000 (05:40 +0200)]
Don't mistake certain JS method calls for keywords

* lisp/progmodes/js.el (js--ctrl-statement-indentation):
Braceless keyword can't come after a period (bug#22063).

9 years agoRead frame_title_format from buffer-local variable for NS port
David Reitter [Tue, 1 Dec 2015 01:52:27 +0000 (20:52 -0500)]
Read frame_title_format from buffer-local variable for NS port

* nsfns.m (x_implicitly_set_name): Read frame-title-format and
icon-title-format variables from buffer in appropriate window.
(Bug#22048)

9 years ago* lisp/replace.el (occur-engine): Count matches in empty lines.
Juri Linkov [Mon, 30 Nov 2015 23:38:15 +0000 (01:38 +0200)]
* lisp/replace.el (occur-engine): Count matches in empty lines.

(Bug#22062)

9 years ago* src/emacs-module.h: Fix finalizer typedef for C++11
Aurélien Aptel [Mon, 30 Nov 2015 22:53:40 +0000 (23:53 +0100)]
* src/emacs-module.h: Fix finalizer typedef for C++11

C++11 standard doesn't allow exception-specification in typedef.
The workaround is to declare a dummy function prototype and use
decltype on it.

9 years agoFix last change
Eli Zaretskii [Mon, 30 Nov 2015 20:46:45 +0000 (22:46 +0200)]
Fix last change

* src/emacs-module.c (lisp_to_value, value_to_lisp)
[WIDE_EMACS_INT]: Avoid compiler warnings.

9 years ago; Fix broken reference
Phillip Lord [Mon, 30 Nov 2015 20:19:24 +0000 (20:19 +0000)]
; Fix broken reference

 * doc/lispref/test.texi: Fix cross-reference.

9 years ago; Added documentation for undo-auto functionality.
Phillip Lord [Tue, 24 Nov 2015 23:02:11 +0000 (23:02 +0000)]
; Added documentation for undo-auto functionality.

 * doc/lispref/text.texi: Documentation added
 * etc/NEWS: Annoucement added
 * lisp/simple.el (undo-auto--amalgamate): Docstring fix.

9 years agoRely on conservative stack scanning to find "emacs_value"s
Stefan Monnier [Mon, 30 Nov 2015 19:34:42 +0000 (14:34 -0500)]
Rely on conservative stack scanning to find "emacs_value"s

* src/emacs-module.c (struct emacs_value_tag)
(struct emacs_value_frame, struct emacs_value_storage): Remove.
(value_frame_size): Remove constant.
(struct emacs_env_private): Use Lisp_Object for non_local_exit info.
(lisp_to_value): Remove first arg.
(module_nil): New constant.
Use it instead of NULL when returning an emacs_value.
(module_make_function): Adjust to new calling convention of
Qinternal_module_call.
(DEFUN): Receive args in an array rather than a list.
Use SAFE_ALLOCA rather than xnmalloc.  Skip the lisp_to_value loop when
we don't have WIDE_EMACS_INT.  Adjust to new type of non_local_exit info.
(module_non_local_exit_signal_1, module_non_local_exit_throw_1):
Adjust to new type of non_local_exit info.
(ltv_mark) [WIDE_EMACS_INT]: New constant.
(value_to_lisp, lisp_to_value): Rewrite.
(initialize_frame, initialize_storage, finalize_storage): Remove functions.
(allocate_emacs_value): Remove function.
(mark_modules): Gut it.
(initialize_environment): Don't initialize storage any more.
Keep the actual env object on Vmodule_environments.
(finalize_environment): Don't finalize storage any more.
(syms_of_module): Initialize ltv_mark and module_nil.

* src/emacs-module.h (emacs_value): Make it more clear that this type
is really opaque, including the fact that NULL may not be valid.

* modules/mod-test/mod-test.c (Fmod_test_signal, Fmod_test_throw):
Don't assume that NULL is a valid emacs_value.

9 years ago; * etc/NEWS: Move some entries to their correct sections.
Eli Zaretskii [Mon, 30 Nov 2015 19:27:18 +0000 (21:27 +0200)]
; * etc/NEWS: Move some entries to their correct sections.

9 years agoYet another doc improvement for search commands
Eli Zaretskii [Mon, 30 Nov 2015 17:30:29 +0000 (19:30 +0200)]
Yet another doc improvement for search commands

* doc/emacs/search.texi (Word Search, Symbol Search)
(Regexp Search): Document commands that don't support lax
whitespace matching or character folding.
(Nonincremental Search): Mention the search commands that can be
invoked from the menu bar.

* lisp/isearch.el (isearch-define-mode-toggle-word)
(isearch-define-mode-toggle-symbol)
(isearch-define-mode-toggle-character-fold): Note in the doc
string that turning these on exits the regexp mode.
(isearch-forward-regexp, isearch-forward-word)
(isearch-forward-symbol, isearch-backward-regexp)
(word-search-backward, word-search-forward)
(word-search-backward-lax, word-search-forward-lax): State in the
doc string which commands don't support character folding and/or
lax-whitespace matching.

9 years agoRun `window-size-change-functions' also when reading from minibuffer
Martin Rudalics [Mon, 30 Nov 2015 17:24:13 +0000 (18:24 +0100)]
Run `window-size-change-functions' also when reading from minibuffer

* src/xdisp.c (redisplay_internal): Run `window-size-change-functions'
also when reading from minibuffer.

9 years agoFix scrambling of html-rendered item buffers
Ulf Jasper [Mon, 30 Nov 2015 16:55:35 +0000 (17:55 +0100)]
Fix scrambling of html-rendered item buffers

* net/newst-treeview.el (newsticker--treeview-render-text): Fix
  scrambling of contents by wrapping call to html-renderer in
  save-selected-window.

9 years agoFix font typo in previous doc fix.
Paul Eggert [Mon, 30 Nov 2015 17:00:25 +0000 (09:00 -0800)]
Fix font typo in previous doc fix.

9 years agoA bit more security doc, esp. file local vars
Paul Eggert [Mon, 30 Nov 2015 16:56:55 +0000 (08:56 -0800)]
A bit more security doc, esp. file local vars

* doc/emacs/emacs.texi (Top):
* doc/emacs/misc.texi (Miscellaneous Commands):
Refer to new Host Security section.
(Host Security): New section.
* doc/lispref/os.texi (Security Considerations):
Mention file local variables.

9 years ago* lisp/character-fold.el: Comment out branching code
Artur Malabarba [Mon, 30 Nov 2015 15:05:44 +0000 (15:05 +0000)]
* lisp/character-fold.el: Comment out branching code

(character-fold-to-regexp): Comment out code that uses multi-char
table.  The branching caused by this induces absurdly long regexps,
up to 10k chars for as little as 25 input characters.

9 years agoSpelling and grammar fixes
Paul Eggert [Mon, 30 Nov 2015 05:50:59 +0000 (21:50 -0800)]
Spelling and grammar fixes

9 years agoMake lisp-completion-at-point a wrapper instead of an alias
Dmitry Gutov [Mon, 30 Nov 2015 03:27:34 +0000 (05:27 +0200)]
Make lisp-completion-at-point a wrapper instead of an alias

* lisp/progmodes/elisp-mode.el (lisp-completion-at-point):
Turn into an obsolete wrapper around elisp-completion-at-point
(bug#20455).

9 years ago* lisp/isearch.el (isearch-search-fun-default): Nicer error
Artur Malabarba [Sun, 29 Nov 2015 22:04:33 +0000 (22:04 +0000)]
* lisp/isearch.el (isearch-search-fun-default): Nicer error

message when the search fails.

9 years agoUpdate menu-bar-goto-uses-etags-p for the current xref API
Dmitry Gutov [Sun, 29 Nov 2015 21:41:58 +0000 (23:41 +0200)]
Update menu-bar-goto-uses-etags-p for the current xref API

* lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Consult
xref-backend-functions, instead of now-nonexistent
xref-find-function.

9 years ago* lisp/isearch.el (isearch-define-mode-toggle): Advertise binding
Artur Malabarba [Sun, 29 Nov 2015 21:26:47 +0000 (21:26 +0000)]
* lisp/isearch.el (isearch-define-mode-toggle): Advertise binding

9 years ago* lisp/menu-bar.el: Use folding in searches
Artur Malabarba [Sun, 29 Nov 2015 21:20:33 +0000 (21:20 +0000)]
* lisp/menu-bar.el: Use folding in searches

(nonincremental-search-forward): Use `isearch-search-fun-default'
to determine the search function.
(nonincremental-search-backward)
(nonincremental-repeat-search-forward)
(nonincremental-repeat-search-backward): Use it.

9 years ago* lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Fix a warning
Artur Malabarba [Sun, 29 Nov 2015 21:14:19 +0000 (21:14 +0000)]
* lisp/menu-bar.el (menu-bar-goto-uses-etags-p): Fix a warning

9 years ago* lisp/character-fold.el (character-fold-to-regexp): Be careful
Artur Malabarba [Sun, 29 Nov 2015 20:42:02 +0000 (20:42 +0000)]
* lisp/character-fold.el (character-fold-to-regexp): Be careful

not to return huge regexps.

9 years ago; * etc/NEWS: Move entries
Eli Zaretskii [Sun, 29 Nov 2015 17:55:31 +0000 (19:55 +0200)]
; * etc/NEWS: Move entries

Move entries of 'bidi-find-overridden-directionality' and
'buffer-substring-with-bidi-context' to the "Lisp Changes"
section.

9 years agoImprove documentation of string-collate-* functions
Eli Zaretskii [Sun, 29 Nov 2015 17:52:16 +0000 (19:52 +0200)]
Improve documentation of string-collate-* functions

* doc/lispref/strings.texi (Text Comparison): Improve wording and
indexing of 'string-collate-equalp' and 'string-collate-lessp'.

* etc/NEWS: Move the entry of 'string-collate-equalp' and
'string-collate-lessp' to "Lisp Changes" section and mark it as
documented.

9 years agoDocument truncate-string-ellipsis
Eli Zaretskii [Sun, 29 Nov 2015 17:40:08 +0000 (19:40 +0200)]
Document truncate-string-ellipsis

* doc/lispref/display.texi (Size of Displayed Text): Document
'truncate-string-ellipsis'.

* lisp/international/mule-util.el (truncate-string-ellipsis): Doc fix.
(truncate-string-to-width): Mention in the doc string that the
default for ELLIPSIS comes from 'truncate-string-ellipsis'.

* etc/NEWS: Move the 'truncate-string-ellipsis' entry to the "Lisp
Changes" section.

9 years ago; * etc/NEWS: Mark insert-register entry as already documented.
Eli Zaretskii [Sun, 29 Nov 2015 17:18:43 +0000 (19:18 +0200)]
; * etc/NEWS: Mark insert-register entry as already documented.

9 years agoFix confusion wrt character folding in the Emacs manual
Eli Zaretskii [Sun, 29 Nov 2015 16:31:09 +0000 (18:31 +0200)]
Fix confusion wrt character folding in the Emacs manual

* doc/emacs/search.texi (Nonincremental Search, Regexp Search):
Document that invoking search-forward/backward and
re-search-forward/backward supports only case folding, but not the
rest of the lax-search features.  Reported by Mike Kupfer
<m.kupfer@acm.org>.

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

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

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

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

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

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

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

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

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

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

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

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

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

9 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".

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

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

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

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

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

9 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)

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

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

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

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

9 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"

9 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)

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

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

9 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)

9 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

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

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

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

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

9 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".

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

9 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)

9 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'.

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

9 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

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

9 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

9 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)

9 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).

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

9 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)

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

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

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

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

9 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>

9 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

9 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

9 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).

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

9 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'.

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