1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00
Commit Graph

121110 Commits

Author SHA1 Message Date
Nicolas Petton
17d667b387 Add seq-intersection and seq-difference to the seq library
* lisp/emacs-lisp/seq.el (seq-intersection, seq-difference): New
functions.

* test/automated/seq-tests.el: Add tests for seq-intersection and
seq-difference.

* doc/lispref/sequences.texi: Add documentation for seq-intersection
and seq-difference.
2015-04-15 01:55:03 +02:00
Dmitry Gutov
4191e54fc6 ; CONTRIBUTE: Update the "make the ChangeLog entry in their name" bit
Fixes: debbugs:20328
2015-04-15 02:21:55 +03:00
Dmitry Gutov
2b714275e3 ; CONTRIBUTE: Remove the "relax this rule for commit messages" bit
Fixes: debbugs:20328
2015-04-15 02:15:07 +03:00
Dmitry Gutov
93d4412046 ; Set indent-tabs-mode to nil in (most) Elisp sources
Fixes: bug#20323
2015-04-15 01:41:10 +03:00
Stefan Monnier
be13be3cd0 * eieio-core.el (class-abstract-p): Don't inline, to avoid leaking internals 2015-04-14 17:26:12 -04:00
Sam Steingold
e45dbdc386 package--ensure-init-file: widen requires save-restriction 2015-04-14 15:14:20 -04:00
Eli Zaretskii
95cee7f6a6 Improve the commit-msg Git hook for unibyte environments
* build-aux/git-hooks/commit-msg: Set LC_ALL=C, before running Awk
in unibyte environments.  (Suggested by Paul Eggert
<eggert@cs.ucla.edu>.)  Use a more accurate approximation to
[:print:], based on UTF-8 sequences of the unprintable characters.
2015-04-14 21:57:23 +03:00
Eli Zaretskii
807a0e98f0 Describe problems with cursor caused by Windows Magnifier
* etc/PROBLEMS: Describe the problem with cursor shape on
MS-Windows due to Windows Magnifier.

Fixes: Bug#20271
2015-04-14 19:34:05 +03:00
Eli Zaretskii
6c284c6b58 Make [:print:] support non-ASCII characters correctly
* src/regex.c (ISPRINT): Call 'printablep' for multibyte characters.
(BIT_PRINT): New bit mask.
(re_wctype_to_bit): Return BIT_PRINT for RECC_PRINT.
* src/character.c (printablep): New function.
* src/character.h (printablep): Add prototype.

* lisp/emacs-lisp/rx.el (rx): Doc fix: document the new behavior
of 'print', 'alnum', and 'alphabetic'.

* doc/lispref/searching.texi (Char Classes): Document the new
behavior of [:print:].

* etc/NEWS: Mention the new behavior of [:print:].
2015-04-14 18:47:04 +03:00
Eli Zaretskii
8802474a21 Assign correct general-category and names to surrogates
* admin/unidata/unidata-gen.el (unidata-setup-list): Don't ignore
surrogates.  This avoids assigning them the default
general-category of 'Cn', i.e. unassigned codepoints.
(unidata-get-name): Give surrogates synthetic names.
2015-04-14 18:37:07 +03:00
Paul Eggert
b5919771ae Assume C89 offsetof in xterm.c, xlwmenu.c
* lwlib/xlwmenu.c (offset):
* src/xterm.c (cvt_string_to_pixel_args):
Use offsetof, not XtOffset.
2015-04-14 00:58:37 -07:00
Paul Eggert
96a858a442 Assume C89 offsetof in widget.c
* src/widget.c (XtOffset): Remove; no longer needed.
(offset): Implement via offsetof instead of via pre-C89 XtOffset hack.
2015-04-14 00:53:35 -07:00
Paul Eggert
7744cc7e95 Fix think-o in previous patch
* src/window.c (count_windows, get_leaf_windows):
Don't optimize count_windows incorrectly.
2015-04-14 00:26:46 -07:00
Paul Eggert
b80c5ebc4f Avoid some int overflows in window.c
* src/print.c (print_object):
* src/window.c (sequence_number):
* src/window.h (struct window.sequence_number):
Don't assume window sequence number fits in int.
* src/window.c (window_select_count):
* src/window.h (struct window.use_time, window_select_count):
Don't assume window use time fits in int.
* src/window.c (Fsplit_window_internal):
Don't assume user-supplied integer, or sum, fits in int.
(Fset_window_configuration, count_windows, get_leaf_windows)
(save_window_save, Fcurrent_window_configuration):
Use ptrdiff_t for object counts.
(Fset_window_configuration): Omit unused local 'n'.
(count_windows): Simplify by writing in terms of get_leaf_windows.
(get_leaf_windows): Don't store through FLAT if it's null.
(extract_dimension): New static function.
(set_window_margins, set_window_fringes, set_window_scroll_bars):
Use it to avoid undefined behavior when converting user-supplied
integer to 'int'.
2015-04-13 23:26:59 -07:00
Glenn Morris
e84d1ca3c6 Minor doc copyedits
* doc/emacs/custom.texi (Init Examples): Tweak example, replace typo.

* doc/lispintro/emacs-lisp-intro.texi (condition-case): Typo fix.
2015-04-13 23:20:48 -07:00
Katsumi Yamaoka
d4b44a07a7 [Gnus] Catch the invalid-operation that idna.el will issue
* lisp/gnus/gnus-art.el (gnus-use-idna):
* lisp/gnus/gnus-sum.el (gnus-summary-idna-message):
* lisp/gnus/message.el (message-use-idna):
Catch the invalid-operation that idna.el will issue.
2015-04-14 03:35:02 +00:00
Paul Eggert
b16cdc2782 * doc/lispref/processes.texi (Shell Arguments): Prefer diff -u. 2015-04-13 20:32:22 -07:00
Sam Steingold
845cb4a2ce package--ensure-init-file: widen before looking for "(package-initialize)" 2015-04-13 23:27:02 -04:00
Dmitry Gutov
a9ccfaefc1 Change diff-switches default to `-u'
Fixes: debbugs:20290

* doc/emacs/files.texi (Comparing Files): Document the new default
value of `diff-switches'.

* doc/emacs/trouble.texi (Sending Patches): Document the preference
for unified diff format.  Escape the plus in the suggested `-F' regexp
value.

* lisp/vc/diff.el (diff-switches): Change the default to `-u'.
2015-04-14 05:06:49 +03:00
Stefan Monnier
e192281baa (gnus-group--setup-tool-bar-update): Fix last change
* lisp/gnus/gnus-group.el (gnus-group--setup-tool-bar-update):
cursor-sensor-functions should be a list of functions.
2015-04-13 21:30:27 -04:00
Katsumi Yamaoka
56dfd3de9c Use gmm-called-interactively-p in Gnus
* lisp/gnus/gnus-topic.el (gnus-topic-mode): Use gmm-called-interactively-p.
2015-04-13 23:42:18 +00:00
Stefan Monnier
40d67a3b0b * lisp/loadup.el ("cus-start"): Load it after loaddefs.el
Fixes: debbugs:20321

* lisp/cus-start.el (read-buffer-function): Don't advertize
iswitchb-read-buffer any more.
(iswitchb): Don't tweak this obsolete group any more.
2015-04-13 18:21:00 -04:00
Artur Malabarba
2bad549b95 * lisp/emacs-lisp/package.el: Fix package--ensure-init-file 2015-04-13 20:51:14 +01:00
Artur Malabarba
13634dec03 * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Implement docstrings
Adding a string after a constructor's argument list will use
that string as the constructor function docstring.  If this string
is absent but the struct itself was given a docstring, use that as
the constructor's docstring.

Fixes (bug#17284).
2015-04-13 20:51:14 +01:00
Stefan Monnier
84e0b7dad6 Deprecate intangible' and point-entered' properties
* lisp/emacs-lisp/cursor-sensor.el: New file.

* lisp/simple.el (pre-redisplay-functions): New hook.
(redisplay--pre-redisplay-functions): New function.
(pre-redisplay-function): Use it.
(minibuffer-avoid-prompt): Mark obsolete.
(redisplay--update-region-highlight): Adapt it to work as a function on
pre-redisplay-functions.

* lisp/cus-start.el (minibuffer-prompt-properties--setter): New fun.
(minibuffer-prompt-properties): Use it.  Use cursor-intangible rather
than point-entered to make the prompt intangible.

* lisp/forms.el: Move `provide' calls to the end.
(forms-mode): Don't use `run-hooks' on a local var.
(forms--make-format, forms--make-format-elt-using-text-properties):
Use cursor-intangible rather than `intangible'.
(forms-mode): Enable cursor-intangible-mode.

* lisp/isearch.el (isearch-mode): Use defvar-local.
(cursor-sensor-inhibit): Declare.
(isearch-mode): Set cursor-sensor-inhibit.
(isearch-done): Set it back.
(isearch-open-overlay-temporary, isearch-open-necessary-overlays)
(isearch-close-unnecessary-overlays): Don't bother with `intangible'
any more.

* lisp/ses.el (ses-localvars): Remove `mode-line-process'.
(ses-sym-rowcol, ses-cell-value, ses-col-width, ses-col-printer):
Add Edebug spec.
(ses-goto-print, ses-print-cell, ses-adjust-print-width)
(ses-goto-data, ses-setup, ses-copy-region): Don't let-bind
inhibit-point-motion-hooks any more.
(ses--cell-at-pos, ses--curcell): New functions, extracted from
ses-set-curcell.
(ses-set-curcell): Use them.
(ses-print-cell, ses-setup): Use cursor-intangible instead of
`intangible'.  Make sure cursor-intangible isn't sticky at BOB.
(ses-print-cell-new-width, ses-reprint-all, ses-recalculate-all):
Use ses--cell-at-pos.
(ses--mode-line-process, ses--cursor-sensor-highlight): New functions,
extracted from ses-command-hook.  Make them work with multiple windows
displaying the same buffer.
(ses-mode): Use them via mode-line-process and pre-redisplay-functions.
Enable cursor-intangible-mode.
(ses-command-hook): Remove cell highlight and mode-line update code.
(ses-forward-or-insert, ses-copy-region-helper, ses-sort-column):
Update for new name of text-property holding the cell name.
(ses-rename-cell): Don't mess with mode-line-process.

* lisp/erc/erc-stamp.el (erc-add-timestamp): Use the new
cursor-sensor-functions property instead of point-entered.
(erc-insert-timestamp-right, erc-format-timestamp):
Use cursor-intangible rather than `intangible'.
(erc-munge-invisibility-spec): Use add-to-invisibility-spec and
remove-from-invisibility-spec.  Enable cursor-intangible-mode and
cursor-sensor-mode if needed.
(erc-echo-timestamp): Adapt to calling convention of
cursor-sensor-functions.
(erc-insert-timestamp-right): Remove unused vars `current-window' and
`indent'.

* lisp/gnus/gnus-group.el (gnus-tmp-*): Declare.
(gnus-update-group-mark-positions): Remove unused `topic' var.
(gnus-group-insert-group-line): Remove unused var `header'.
(gnus-group--setup-tool-bar-update): New function.
(gnus-group-insert-group-line): Use it.
(gnus-group-update-eval-form): Declare local
dynamically-bound variables.
(gnus-group-unsubscribe-group): Use \` and \' to match string bounds.

* lisp/gnus/gnus-topic.el (gnus-topic-jump-to-topic)
(gnus-group-prepare-topics, gnus-topic-update-topic)
(gnus-topic-change-level, gnus-topic-catchup-articles)
(gnus-topic-remove-group, gnus-topic-delete, gnus-topic-indent):
Use inhibit-read-only.
(gnus-topic-prepare-topic): Use gnus-group--setup-tool-bar-update.
(gnus-topic-mode): Use define-minor-mode and derived-mode-p.

* lisp/textmodes/reftex-index.el (reftex-display-index):
Use cursor-intangible-mode if available.
(reftex-index-post-command-hook): Check cursor-intangible.

* lisp/textmodes/reftex-toc.el (reftex-toc):
Use cursor-intangible-mode if available.
(reftex-toc-recenter, reftex-toc-post-command-hook):
Check cursor-intangible.

* lisp/textmodes/sgml-mode.el: Use lexical-binding.
(sgml-tag): Use cursor-sensor-functions instead of point-entered.
(sgml-tags-invisible): Use with-silent-modifications and
inhibit-read-only.  Enable cursor-sensor-mode.
(sgml-cursor-sensor): Rename from sgml-point-entered and adjust to
calling convention of cursor-sensor-functions.

* lisp/textmodes/table.el (table-cell-map-hook, table-load-hook)
(table-point-entered-cell-hook, table-point-left-cell-hook):
Don't autoload.
(table-cell-entered-state): Remove var.
(table--put-cell-point-entered/left-property)
(table--remove-cell-properties):
Use cursor-sensor-functions rather than point-entered/left.
(table--point-entered/left-cell-function): Merge
table--point-entered-cell-function and table--point-left-cell-function
and adjust to calling convention of cursor-sensor-functions.
2015-04-13 15:51:15 -04:00
Stefan Monnier
b430d2a836 Update ldef-boots.el 2015-04-13 14:55:10 -04:00
Stefan Monnier
4aca2fdfda * lisp/emacs-lisp/pcase.el (pcase-dolist): Autoload as well. 2015-04-13 14:46:58 -04:00
Stefan Monnier
8bab07bc03 * doc/misc/eieio.texi: Don't advertize now obsolete constructs 2015-04-13 14:36:55 -04:00
Stefan Monnier
5729f459d1 Collapse successive char deletions in the undo log
* src/cmds.c (remove_excessive_undo_boundaries): New function,
extracted from Fself_insert_command.
(Fdelete_char, Fself_insert_command): Use it.
* src/fileio.c (Fmake_symbolic_link): Rename arg to `target'.
* src/keyboard.c (syms_of_keyboard): `top-level' shouldn't be special.
2015-04-13 14:05:09 -04:00
Stefan Monnier
5d9432e649 xterm and OSC 52: Add NEWS entry, and tweak the code
* lisp/term/xterm.el (gui-set-selection) <nil>: Move method definition to
top-level.
(terminal-init-xterm-activate-set-selection): Set a terminal property.
(xterm--set-selection): Use it instead of checking the value of
`terminal-initted'.  Don't use string-bytes.
2015-04-13 11:36:30 -04:00
Philipp Stephani
2b2fd3965f xterm.el: Implement OSC-52 functionality for setting the X selection
* lisp/term/xterm.el (xterm-max-cut-length): New var.
(xterm--set-selection, terminal-init-xterm-activate-set-selection): New funs.
(terminal-init-xterm, xterm--version-handler): Use them.
2015-04-13 10:48:47 -04:00
Stefan Monnier
a2f9da45c4 Remove left over code from when we used an obsolete/loaddefs.el file
* lisp/subr.el (do-after-load-evaluation): Remove left over code from when
we used an obsolete/loaddefs.el file.
2015-04-13 10:41:30 -04:00
Stefan Monnier
2a72ae286d * cedet/semantic/fw.el: Use declare.
* cedet/semantic/fw.el (semantic-exit-on-input)
(semanticdb-without-unloaded-file-searches): Use declare.
(semantic-fw-add-edebug-spec): Remove.
2015-04-13 10:39:25 -04:00
Stefan Monnier
f6bdbdf1f5 (completion-lisp-mode-hook): Use completion-separator-chars
* lisp/completion.el (completion-lisp-mode-hook):
Use completion-separator-chars rather than local key binding.
2015-04-13 10:35:15 -04:00
Stefan Monnier
c9d78e18c6 * src/*.c: Set deactivate_mark buffer-locally
Fixes: debbugs:20260

* src/insdel.c (prepare_to_modify_buffer_1):
* src/fileio.c (Finsert_file_contents): Set deactivate_mark
buffer-locally.
2015-04-13 10:16:38 -04:00
Fabián Ezequiel Gallina
659609d182 python.el: Keep symmetry on sexp navigation with parens
Fixes: debbugs:19954

* lisp/progmodes/python.el
(python-nav--forward-sexp): Add argument skip-parens-p.
(python-nav-forward-sexp, python-nav-backward-sexp)
(python-nav-forward-sexp-safe)
(python-nav-backward-sexp-safe): Use it.

* test/automated/python-tests.el
(python-nav-forward-sexp-1): Fix test.
2015-04-12 22:43:44 -03:00
João Távora
ed28ca4c24 Don't use `setq-local' in Gnus code
This might break upstream builds with older Emacsen

* lisp/gnus/message.el (message-mode): Use `set' and
`make-local-variable' instead of `setq-local'.
2015-04-12 23:25:09 +01:00
Paul Eggert
3a4d078252 Update Makefile.in's .PHONY dependencies
* Makefile.in (change-history-commit, master-branch-is-current)
(no-ChangeLog): Now phony.
2015-04-12 15:21:33 -07:00
Paul Eggert
9d7afc0ccc Remove configure's --with-mmdf option
* configure.ac (MAIL_USE_MMDF): Remove.
* etc/NEWS: Document this.
* lib-src/movemail.c: Assume MAIL_USE_MMDF is not defined.
Fixes: bug#20308
2015-04-12 14:56:32 -07:00
Paul Eggert
30bcb238c3 * doc/man/ChangeLog.01: Rename from doc/man/ChangeLog.1.
That way, 'make install' won't think it's a man page.
Reported by Ashish SHUKLA in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00656.html
2015-04-12 11:26:50 -07:00
Paul Eggert
950c0027cb Improve 'make change-history' prereq tests
* Makefile.in (gen_origin): Fix to match what's in the master branch.
(no-ChangeLog, master-branch-is-current): New rules.
(change-history): Depend on them, to avoid similar future problems.
Escape the local-variables string to pacify Emacs when editing
Makefile.in.
2015-04-12 10:40:41 -07:00
Artur Malabarba
fe3b5b3f45 * test/automated/package-test.el (with-package-test): Kill Packages buffer 2015-04-12 16:16:06 +01:00
Artur Malabarba
e99d8cb25d * lisp/emacs-lisp/package.el: Improve transaction y-or-n prompt
(package-menu--prompt-transaction-p): Prompt for "Delete" first,
"Upgrade" last, and use capitalized instead of all-caps.
2015-04-12 16:16:06 +01:00
Artur Malabarba
5aa0dfe4b7 * lisp/emacs-lisp/package.el: Completely silence async operations
(package--make-autoloads-and-stuff): Silence autoloads.

(package--save-selected-packages): New function, silences
`customize-save-variable'.
(package--user-selected-p, package-install-from-buffer)
(package-delete, package-install): Use it.

(package-install-from-archive)
(package-menu--perform-transaction): Silence.

(package-menu-execute): Feedback when operation starts.
2015-04-12 16:16:06 +01:00
Artur Malabarba
dfdd7e1944 Use delay-mode-hooks when visiting the init-file
* lisp/emacs-lisp/package.el (package--ensure-init-file):
delay-mode-hooks

* lisp/cus-edit.el (custom-save-all): delay-mode-hooks
2015-04-12 16:16:06 +01:00
Artur Malabarba
5fb807efcd * lisp/files.el: Only message when saving if save-silently is nil
(save-silently): New variable.
(files--message): New function.

(find-file-noselect, save-buffer, basic-save-buffer)
(basic-save-buffer-2, save-some-buffers, not-modified)
(append-to-file): Use them.
2015-04-12 16:16:05 +01:00
Johan Bockgård
2e47de365b Support debug declarations in pcase macros
* lisp/emacs-lisp/pcase.el (pcase-MACRO): New edebug spec.
(pcase-UPAT): Use it.  Remove "`".
(pcase--edebug-match-macro): New function.
(pcase-defmacro): Support debug declarations.

* lisp/emacs-lisp/cl-macs.el (cl-struct) <pcase-defmacro>:
* lisp/emacs-lisp/eieio.el (eieio) <pcase-defmacro>:
* lisp/emacs-lisp/pcase.el (\`): <pcase-defmacro>: Add debug declaration.
2015-04-12 16:26:52 +02:00
Johan Bockgård
66a53da5f0 pcase.el: Edebug support for `app' and vector patterns
* lisp/emacs-lisp/pcase.el (pcase-FUN): New edebug spec.
(pcase-UPAT): Use it. Support `app' patterns.
(pcase-QPAT): Support vector patterns.
2015-04-12 16:26:51 +02:00
Johan Bockgård
b62d7956be edebug.el: Disambiguate vector specifications
* lisp/emacs-lisp/edebug.el (edebug-match-list): Always treat
`(vector ...)' as a vector specification, not as a sublist.
2015-04-12 16:26:51 +02:00
Johan Bockgård
f4dbec453d (gnus-summary-refer-thread): Don't clobber unread articles
This fixes a bug where `A T' causes "random" articles to become marked
as read.

* lisp/gnus/gnus-sum.el (gnus-summary-refer-thread): Make sure
gnus-newsgroup-unreads remains sorted.
2015-04-12 16:13:08 +02:00