1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

123663 Commits

Author SHA1 Message Date
Alan Mackenzie
64ad54734d Tidy up documentation associated with window groups.
* doc/lispref/windows.texi (Basic Windows): Add an @anchor for "Window
Groups".  Correct example function to `window-group-start'.
(Window Start and End, Textual scrolling): Point to the new anchor.  State
that (most of) the args in window group functions have the same meaning as for
the corresponding window primitives.

* doc/lispref/positions.texi (Screen Lines).  Same as above.
2015-12-15 11:41:54 +00:00
Alan Mackenzie
16dac3f9af Ispell: Bind isearch-regexp-function to nil around call to isearch..-new-loop
* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay): bind
isearch-regexp-function to nil around call to isearch-lazy-highligh-new-loop.
2015-12-14 17:29:45 +00:00
Alan Mackenzie
9ae19d2f0d Enhance ispell-skip-region-alist by generating part of it at runtime.
* lisp/textmodes/ispell.el (ispell--\\w-filter, ispell--make-\\w-expression)
(ispell--make-filename-or-URL-re): New functions which generate a regexp.
(ispell-skip-region-alist): Remove the bit that matches a filename/URL, etc.
(ispell-begin-skip-region-regexp, ispell-skip-region-list, ispell-message):
Include the result of ispell--make-filename-or-URL-re in regexps.
2015-12-14 17:17:31 +00:00
Alan Mackenzie
e8937de554 Replace GROUP argument in six window primitives by new functions.
* doc/lispref/windows.texi (Window Start and End, Textual Scrolling)
* doc/lispref/positions.texi (Screen Lines): Remove optional GROUP argument
from description of six window functions.  Add in description of new functions
window-group-start, window-group-end, set-window-group-start,
pos-visible-in-window-group-p, recenter-group and move-to-window-group-line,
together with the six variables indirecting to the pertinent group
functions.

* src/window.c
* src/keyboard.c: Revert the commit from 2015-11-11 12:02:48, in so far as it
applies to these two files, which added the GROUP argument to six window
primitives.

* lisp/follow.el (follow-mode): Use updated variable names for the indirected
functions.

* lisp/isearch.el (isearch-update, isearch-done, isearch-string-out-of-window)
(isearch-back-into-window, isearch-lazy-highlight-new-loop)
(isearch-lazy-highlight-search, isearch-lazy-highlight-update): Replace calls
to window primitives (e.g. window-start) with a GROUP argument by calls to
new functions (e.g. window-group-start).

* lisp/ispell.el (ispell-command-loop): Replace call to
pos-visible-in-window-p with pos-visible-in-window-group-p.

* lisp/window.el (window-group-start, window-group-end)
(set-window-group-start, recenter-group, pos-visible-in-window-group-p)
(selected-window-group, move-to-window-group-line): New functions.
(window-group-start-function, window-group-end-function)
(set-window-group-start-function, recenter-group-function)
(pos-visible-in-window-group-p-function, selected-window-group-function)
(move-to-window-group-line-function): New variables.
2015-12-14 16:38:07 +00:00
Alan Mackenzie
3194f1ccd9 Further progress making Isearch, Ispell, Replace work with Follow Mode.
* lisp/follow.el: (follow-mode): Remove references to sit*-for-function, which
no longer exists.  Add follow-post-command-hook to  three special purpose
hooks at setup, and remove them at tear down.

* lisp/isearch.el: (isearch-update): invoke isearch-update-post-hook before
isearch-lazy-highlight-new-loop.
(isearch-lazy-highlight-new-loop): Restore this function to what it previously
was, merging the functionality of isearch-lazy-highlight-maybe-new-loop into
it.
(isearch-lazy-highlight-maybe-new-loop): function removed.

* lisp/replace.el: (replace-update-post-hook): New hook variable.
(perform-replace): Add second (nil) argument to looking-back.  Invoke
replace-update-post-hook before calling replace-highlight.

* lisp/textmodes/ispell.el: (ispell-update-post-hook): New hook variable.
(ispell-command-loop): invoke ispell-update-post-hook.  Add GROUP argument to
call of pos-visible-in-window-p.
(ispell-display-buffer): Place *Choices* window at the top of the last window
in a window group.
2015-12-07 15:12:15 +00:00
Alan Mackenzie
f5c403d269 Amend doc of `mapconcat': it can take sequences, not merely strings.
* doc/lispref/functions.texi (Mapping Functions): Amend the doc of `mapconcat'
to say that SEPARATOR and the results from FUNCTION may be any character
sequences, not just strings.  Add an @xref to "Sequences Arrays Vectors".
2015-12-07 10:39:07 +00:00
Alan Mackenzie
72c20d0be8 Merge branch 'scratch/follow' of /home/acm/emacs/emacs.git/emacs-25 into scratch/follow
Merge necessitated by a rebase operation.
2015-12-04 19:06:27 +00:00
Alan Mackenzie
bf510d8ab0 lisp/isearch.el: Eliminate macro isearch-call-message, replacing with funcall. 2015-12-04 18:15:27 +00:00
Alan Mackenzie
64c5730365 First commit to scratch/follow. Make Isearch work with Follow Mode, etc.
doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of
Windows" and new @defun selected-window-group.
(Window Start and End): Describe new &optional parameter GROUP and
...-group-function for window-start, window-end, set-window-start, and
pos-visible-in-window-p.
(Textual Scrolling) Describe the same for recenter.
doc/lispref/positions.texi (Screen Lines): Describe the same for
move-to-window-line.

src/window.c (Fwindow_start, Fwindow_end, Fset_window_start)
(Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar
new optional parameter "group".  At the beginning of each, check whether the
corresponding ...-group-function is set to a function, and if so execute this
function in place of the normal processing.
(syms_of_window): Define symbols for the six new variables below.
(window-start-group-function, window-end-group-function)
(set-window-start-group-function, recenter-group-function)
(pos-visible-in-window-p-group-function, move-to-window-line-group-function):
New permanent local buffer local variables.
src/keyboard.c (Fposn_at_point): Add extra parameter in call to
Fpos_visible_in_window_p.

lisp/window.el (selected-window-group-function): New permanent local buffer
local variable.
(selected-window-group): New function.

lisp/follow.el (follow-mode): Set the ...-group-function variables at mode
enable, kill them at mode disable.  Add/remove follow-after-change to/from
after-change-functions.
(follow-start-end-invalid): New variable.
(follow-redisplay): Manipulate follow-start-end-invalid.
(follow-after-change, follow-window-start, follow-window-end)
(follow-set-window-start, follow-pos-visible-in-window-p)
(follow-move-to-window-line, follow-sit-for): New functions.

lisp/isearch.el (isearch-call-message): New macro.
(isearch-update, with-isearch-suspended, isearch-del-char)
(isearch-search-and-update, isearch-ring-adjust): Invoke above new macro.
(with-isearch-suspended): Rearrange code such that isearch-call-message is
invoked before point is moved.
(isearch-message): Add comment about where point must be at function call.
(isearch-search): Remove call to isearch-message.
(isearch-lazy-highlight-window-group): New variable.
(isearch-lazy-highlight-new-loop): Unconditionally start idle timer.  Move
the battery of tests to ...
(isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer.
Note: (sit-for 0) is still called.
(isearch-lazy-highlight-update): Check membership of
isearch-lazy-highlight-window-group.  Don't set the `window' overlay
property.
(isearch-update, isearch-done, isearch-string-out-of-window)
(isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop)
(isearch-lazy-highlight-search, isearch-lazy-highlight-update)
(isearch-lazy-highlight-update): Call the six amended primitives (see
src/window.c above) with the new `group' argument set to t, to cooperate
with Follow Mode.
2015-12-04 18:15:27 +00:00
Artur Malabarba
30f3432e95 * lisp/character-fold.el: Remove special case-folding support
(character-fold-to-regexp): Remove special code for
case-folding.  Char-fold search still respects the
`case-fold-search' variable (i.e., f matches F).  This only
removes the code that was added to ensure that f also matched
all chars that F matched.  For instance, after this commit, f
no longer matches 𝔽.

This was necessary because the logic created a regexp with
2^(length of the string) redundant paths.  So, when a very
long string "almost" matched, Emacs took a very long time to
figure out that it didn't.  This became particularly relevant
because isearch's lazy-highlight does a search bounded by (1-
match-end) (which, in most circumstances, is a search that
almost matches).  A recipe for this can be found in bug#22090.
2015-12-04 15:12:34 +00:00
Stefan Monnier
3a9df7589a * lisp/emacs-lisp/cl-macs.el (character): Can't be negative
Fixes (bug#21701)
2015-12-04 08:28:39 -05:00
Glenn Morris
9bfcd87c04 ; Auto-commit of loaddefs files. 2015-12-04 07:20:41 -05:00
Daiki Ueno
97e4be833b lisp/gnus/qp.el: Don't replace "from " at bol
* lisp/gnus/qp.el (quoted-printable-encode-region): Bind `case-fold-search'
to nil when looking for "^From ".  Problem reported by Simon Josefsson.
2015-12-04 05:15:59 +00:00
Phillip Lord
eaa1fd6dbf Externalize some symbols in undo-auto
* doc/lispref/text.texi: Update symbols.
 * lisp/simple.el (undo-auto--amalgamate,
   undo-auto--current-boundary-timer): Make symbols public.
 * src/cmds.c (Fself_insert_command,Fdelete_char): Call
   updated symbol.
2015-12-03 21:27:33 +00:00
Stefan Monnier
7d611e25ff * lisp/emacs-lisp/smie.el (smie-next-sexp): Fix BOB "token" 2015-12-03 15:22:14 -05:00
Michael Albinus
a1c26b19fc Some error message improvements in tramp-sh.el
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Suppress error messages for "mesg" and "biff" calls.
(tramp-get-remote-path): Ignore errors when expanding
`tramp-own-remote-path'.  Raise a warning instead.
2015-12-03 20:31:49 +01:00
Eli Zaretskii
0cec548152 Document 'nacl' value for 'system-type'
* doc/lispref/os.texi (System Environment): Document the 'nacl'
value of 'system-type'.
2015-12-03 18:36:03 +02:00
Eli Zaretskii
e011b22d20 Document 'window-max-chars-per-line'
* doc/lispref/windows.texi (Window Sizes): Document
'window-max-chars-per-line'.
2015-12-03 18:26:39 +02:00
Artur Malabarba
1e1aabbc09 Fix some file headers for the purpose of `package--builtins'
* lisp/emacs-lisp/cl-preloaded.el
* lisp/emacs-lisp/eieio-compat.el
* lisp/net/sasl-scram-rfc.el: Add a "Package:" header

* lisp/ielm.el: Fix summary line.
2015-12-03 16:13:57 +00:00
Artur Malabarba
50dce3c422 * lisp/emacs-lisp/package.el (package-unpack): Load before compiling
Reload any previously loaded package files before compiling
the package (also reload the same files after compiling).
This ensures that we have the most recent definitions during
compilation, and avoids generating bad elc files when a macro
changes and it is used in a different file from the one it's
defined in.
2015-12-03 16:13:57 +00:00
Artur Malabarba
67c6906a5f * lisp/emacs-lisp/package.el: Refactor package activation code
(package-activate): Move code that activates dependencies into
package-activate-1.
(package--load-files-for-activation): New function.
(package-activate-1): Add code for (optionally) activating
dependencies, and move file-loading code into
`package--load-files-for-activation'.
2015-12-03 16:13:57 +00:00
Eli Zaretskii
44d6957767 Document new font-related functionality
* doc/lispref/display.texi (Low-Level Font): Document
'default-font-width', 'default-font-height', 'window-font-width',
and 'window-font-height'.

* etc/NEWS: Move entries for 'default-font-width',
'default-font-height', 'window-font-width', and 'window-font-height'
to their place and mark them documented.
2015-12-03 18:03:47 +02:00
Eli Zaretskii
eca277f937 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.
2015-12-03 16:59:42 +02:00
Eli Zaretskii
4d10a7d467 Minor copyedit in Emacs manual
* doc/emacs/search.texi (Lax Search): Make wording about character
folding by default less definitive.  (Bug#22043)
2015-12-02 16:09:24 +02:00
Eli Zaretskii
36dbe6fc3e 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.
2015-12-02 16:06:01 +02:00
Stephen Leake
0af2c269b1 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'.
2015-12-02 06:40:27 -06:00
Dmitry Gutov
f651cd1199 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).
2015-12-02 04:12:19 +02:00
Eli Zaretskii
cef6c89175 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.
2015-12-01 21:29:14 +02:00
Eli Zaretskii
bdebeb77a0 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.
2015-12-01 20:34:12 +02:00
Eli Zaretskii
b99a34bcb0 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.
2015-12-01 18:16:22 +02:00
Eli Zaretskii
e702ab8d84 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.
2015-12-01 18:11:11 +02:00
Artur Malabarba
628d0063f8 * lisp/emacs-lisp/package.el: Update header comments 2015-12-01 15:11:33 +00:00
Artur Malabarba
61a4b57f1d * 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.
2015-12-01 13:55:45 +00:00
Xue Fuqiao
13258026aa * doc/emacs/ack.texi (Acknowledgments): Update. 2015-12-01 21:21:18 +08:00
Glenn Morris
ada8723d1b ; Auto-commit of loaddefs files. 2015-12-01 07:18:24 -05:00
Michael Albinus
57062fcfad 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.
2015-12-01 13:12:18 +01:00
Andreas Schwab
407cde8355 * src/lread.c (syms_of_lread): Doc fix. 2015-12-01 11:42:49 +01:00
Dmitry Gutov
48471e9614 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).
2015-12-01 05:41:14 +02:00
David Reitter
49689a415c 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)
2015-11-30 21:01:06 -05:00
Juri Linkov
5eafc0a7a9 * lisp/replace.el (occur-engine): Count matches in empty lines.
(Bug#22062)
2015-12-01 01:38:15 +02:00
Aurélien Aptel
7210f5130a * 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.
2015-11-30 23:53:40 +01:00
Eli Zaretskii
ec62f2f5ad Fix last change
* src/emacs-module.c (lisp_to_value, value_to_lisp)
[WIDE_EMACS_INT]: Avoid compiler warnings.
2015-11-30 22:46:45 +02:00
Phillip Lord
f227655b2d ; Fix broken reference
* doc/lispref/test.texi: Fix cross-reference.
2015-11-30 20:19:24 +00:00
Phillip Lord
c2ba4a20aa ; Added documentation for undo-auto functionality.
* doc/lispref/text.texi: Documentation added
 * etc/NEWS: Annoucement added
 * lisp/simple.el (undo-auto--amalgamate): Docstring fix.
2015-11-30 20:14:13 +00:00
Stefan Monnier
3eb93c07f7 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.
2015-11-30 14:34:42 -05:00
Eli Zaretskii
17fa6ba824 ; * etc/NEWS: Move some entries to their correct sections. 2015-11-30 21:27:18 +02:00
Eli Zaretskii
3e9ac80e01 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.
2015-11-30 19:30:29 +02:00
Martin Rudalics
10870c8544 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.
2015-11-30 18:24:13 +01:00
Ulf Jasper
de203a67d4 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.
2015-11-30 18:02:36 +01:00
Paul Eggert
1564a265b9 Fix font typo in previous doc fix. 2015-11-30 09:00:25 -08:00