1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

121237 Commits

Author SHA1 Message Date
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
Johan Bockgård
bda8469be5 mouse-sel.el: Fix mouse-sel-get-selection-function
* lisp/obsolete/mouse-sel.el (mouse-sel-get-selection-function):
Use gui--last-selected-text-primary instead of no longer existing
gui-last-selected-text.
2015-04-12 15:55:32 +02:00
Johan Bockgård
a77540e774 * lisp/rect.el (delete-whitespace-rectangle-line): Don't cross EOL. 2015-04-12 15:50:02 +02:00
Johan Bockgård
a3d11ecb83 * lisp/net/nsm.el (nsm-query-user): Use cursor-in-echo-area. 2015-04-12 15:37:50 +02:00
Artur Malabarba
d0fcb21254 * lisp/emacs-lisp/package.el (list-packages): Avoid redundant generate 2015-04-12 13:47:58 +01:00
Artur Malabarba
d06eeb85e0 * lisp/emacs-lisp/package.el (list-packages): Call refresh in right buffer 2015-04-12 13:45:30 +01:00
Artur Malabarba
9a7ddde977 * lisp/emacs-lisp/bytecomp.el: Silence noninteractive compilations
(byte-compile--interactive): New var.
(byte-compile--message): New function.
(byte-compile-log-1, byte-force-recompile)
(byte-recompile-directory, byte-recompile-file)
(byte-compile-file, compile-defun)
(byte-compile-file-form-defmumble, byte-compile)
(byte-compile-file-form-defalias, display-call-tree): Use it.
2015-04-12 13:45:30 +01:00
Artur Malabarba
ad36067a1e * lisp/files.el: Don't message when nothing happened
(save-some-buffers, basic-save-buffer): Before messaging to say
"nothing was saved" check if (called-interactively-p 'any).
2015-04-12 13:45:30 +01:00
João Távora
25449e7296 Summary: Improve sexp-based movement in message-mode
Works by giving citations and smileys a different syntax.  This helps
modes like `show-paren-mode', `electric-pair-mode', and C-M-*
sexp-based movement.

* lisp/gnus/message.el (message--syntax-propertize): New function.
(message-mode): Set syntax-related vars.
(message-smileys): New variable.

* test/automated/message-mode-tests.el: New file
2015-04-12 13:29:05 +01:00
Paul Eggert
303797134f Use bool for boolean in window.c
* src/window.c:	Omit unnecessary static function decls.
(adjust_window_count, select_window, Fselect_window)
(window_body_width, Fwindow_body_height, Fwindow_body_width)
(set_window_hscroll, check_window_containing, Fwindow_at)
(Fwindow_end, Fset_window_start, Fpos_visible_in_window_p)
(unshow_buffer, replace_window, recombine_windows)
(add_window_to_list, candidate_window_p, next_window)
(Fnext_window, Fprevious_window, window_loop, check_all_windows)
(Fget_buffer_window, Fdelete_other_windows_internal)
(replace_buffer_in_windows_safely, set_window_buffer)
(Fset_window_buffer, Fforce_window_update)
(temp_output_buffer_show, make_parent_window)
(window_resize_check, window_resize_apply, Fwindow_resize_apply)
(resize_frame_windows, Fsplit_window_internal)
(Fdelete_window_internal, grow_mini_window, shrink_mini_window)
(Fresize_mini_window_internal, mark_window_cursors_off)
(window_scroll, window_scroll_pixel_based)
(window_scroll_line_based, scroll_command, Fscroll_other_window)
(Fscroll_left, Fscroll_right, displayed_window_lines, Frecenter)
(Fmove_to_window_line, Fset_window_configuration)
(delete_all_child_windows, apply_window_adjustment)
(set_window_fringes, set_window_scroll_bars)
(Fset_window_vscroll, foreach_window, foreach_window_1)
(compare_window_configurations, Fcompare_window_configurations):
Prefer 'bool', 'true', and 'false' for booleans.
* src/window.h (WINDOW_MODE_LINE_LINES)
(WINDOW_HEADER_LINE_LINES): Omit unnecessary "!!" on bool value.
2015-04-11 20:45:42 -07:00
Artur Malabarba
3ba6b3a9c1 Speed up byte-compilation and autoload generation by avoiding mode-hooks
This prevents emacs-lisp-mode-hook from being run everytime an
autoload file is generated, which can account for a fraction of
package installation time depending on the hooks the user has
configured.

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Use delay-mode-hooks.

* lisp/emacs-lisp/autoload.el (autoload-find-file)
(autoload-find-generated-file): Use delay-mode-hooks.
2015-04-12 03:57:59 +01:00
Artur Malabarba
50ddc67739 * lisp/emacs-lisp/package.el: Improve `package-menu-refresh'
(package-menu-refresh): Respect async and do new package checking.
(list-packages): Use `package-menu-refresh' instead of repeating code.
2015-04-12 03:57:58 +01:00
Artur Malabarba
6f87b180dd * lisp/emacs-lisp/package.el: Improve package-menu-quick-help
(package--quick-help-keys): New variable.
(package--prettify-quick-help-key): New function.
(package-menu-quick-help): Use it.
2015-04-12 03:09:50 +01:00
Artur Malabarba
357edb4e89 * lisp/emacs-lisp/package.el: Fix initially wrong compat table
(package--build-compatibility-table): require finder
2015-04-12 02:33:29 +01:00
Artur Malabarba
f80027b37a * test/automated/package-test.el: Fix new test 2015-04-12 02:14:03 +01:00
Artur Malabarba
ba273b6185 * lisp/emacs-lisp/package.el: Silence async operations
(package--silence): New variable.
(package--message): New function.

(package-import-keyring, package-refresh-contents)
(package-compute-transaction, package-install, package-delete)
(package-menu--perform-transaction, package-menu-execute): Use it.
2015-04-12 01:52:43 +01:00
Artur Malabarba
7cae5c3cb6 * test/automated/package-test.el: Test async functionality
(package-test-update-archives-async): New test
2015-04-12 01:12:33 +01:00
Daiki Ueno
ccade56fbe Utilize `make-process' in epg.el
* lisp/epg.el (epg-error-output): Abolish.
(epg-context): New slot `error-buffer'.
(epg--start): Use `make-process' and `make-pipe-process'.
(epg--process-filter): Remove code separating stderr from stdout.
(epg-wait-for-completion): Simplify `error-output' handling.
(epg-reset): Dispose error buffer.
2015-04-12 07:00:41 +09:00
Paul Eggert
24ecbc008f * .gitignore: Ignore doc temps and outputs. 2015-04-11 13:49:31 -07:00
Paul Eggert
fc530e56cf Port commit-msg to MSYS Bash+Gawk
See Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00610.html
* build-aux/git-hooks/commit-msg (cent_sign_utf8_format)
(cent_sign, print_at_sign, at_sign): Revert previous change.
(print_at_sign): Prepend "BEGIN".
(at_sign): Redirect from /dev/null to be safer with pre-POSIX awk.
2015-04-11 13:05:18 -07:00
Paul Eggert
fadf0205ef Port commit-msg to broken MS-Windows shell
* build-aux/git-hooks/commit-msg (cent_sign):
Just use UTF-8 here rather than ASCII + printf, as the latter fails
on a broken MS-Windows shell.  Reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00592.html
2015-04-11 08:21:17 -07:00
Chris Zheng
dc79845aac Support GnuTLS v3.4 and later on MS-Windows
* src/gnutls.c (syms_of_gnutls) <libgnutls-version>: New DEFSYM.
* lisp/term/w32-win.el (dynamic-library-alist): Determine which
GnuTLS DLL to load according to value of libgnutls-version.

Fixes: bug#20294

Copyright-paperwork-exempt: yes
2015-04-11 18:06:52 +03:00
Paul Eggert
279558f472 Minor quoting etc. fixes to misc manuals
Fix some minor quoting and spacing issues.  Distinguish more
clearly among grave accent and apostrophe (which are ASCII) and
single quote (which is not).  Prefer the standard terms
"apostrophe" and "grave accent" to alternative names that can be
confusing.  Use apostrophes to single-quote ASCII text.
* doc/misc/remember.texi: Spell the mystic's pseudonym in UTF-8
rather than approximating it in ASCII with grave accent.
2015-04-11 07:48:21 -07:00
Daiki Ueno
7c7b96eba0 Respect more keyword args in `make-process'
* process.c (Fmake_process): Respect `:sentinel' and `:filter'
keywords as documented.
2015-04-11 16:06:07 +09:00