Commit graph

1816 commits

Author SHA1 Message Date
Glenn Morris
4f3a895b33 * lisp/simple.el (cycle-spacing--context, cycle-spacing): Doc tweaks.
Include restoring manual line-breaks to state before 2014-03-28T16:26:15Z!mina86@mina86.com.
2014-03-30 17:35:12 -07:00
Daniel Colascione
1861d5a712 completion-in-region-mode improvements 2014-03-30 12:12:57 -07:00
Michal Nazarewicz
687e0e19ae Make cycle-spacing' behave more like just-one-space' if colled once.
* simple.el (cycle-spacing): Never delete spaces on first run by
default, but do so in a new 'fast mode and if there are already
N spaces (the previous behaviour).

Compare N with its value in previous invocation so that changing
prefix argument restarts `cycle-spacing' sequence.

The idea is that with this change, binding M-SPC to
`cycle-spacing' should not introduce any changes in behaviour of
the binding so long as users do not type M-SPC twice in a raw with
the same prefix argument or lack thereof.
2014-03-28 17:26:15 +01:00
Glenn Morris
6730259fea Allow selective autoloading from lisp/obsolete directory
* lisp/Makefile.in (obsolete-autoloads): New rule.
(autoloads): Run obsolete-autoloads.

* lisp/obsolete/iswitchb.el (iswitchb-mode): Use obsolete-autoload.

* lisp/simple.el (iswitchb-mode): Remove hand-written autoloads.
2014-03-27 15:00:49 -04:00
Daniel Colascione
8ab9876a81 Provide command for deleting processes from list-processes buffer 2014-03-26 14:01:47 -07:00
Juanma Barranquero
16adf2e6eb Merge from emacs-24; up to 2014-03-23T23:14:52Z!yamaoka@jpl.org 2014-03-26 16:57:13 +01:00
Barry O'Reilly
657e54f709 Addendum to: Undo in region after markers in undo history relocated
* simple.el (primitive-undo): Correction to 2014-03-24 change.

Fixes: debbugs:16818
2014-03-25 19:30:08 -04:00
Barry O'Reilly
37ea8275f7 Undo in region after markers in undo history relocated
* simple.el (primitive-undo): Only process marker adjustments
validated against their corresponding (TEXT . POS).  Issue warning
for lone marker adjustments in undo history.  (Bug#16818)
(undo-make-selective-list): Add marker adjustments to selective
undo list based on whether their corresponding (TEXT . POS) is in
the region.  Remove variable adjusted-markers, which was unused
and only non nil during undo-make-selective-list.
(undo-elt-in-region): Return nil when passed a marker adjustment
and explain in function doc.

Have (MARKER . ADJUSTMENT) undo records always be immediately
after their corresponding (TEXT . POS) record in undo list.
(Bug#16818)
* lisp.h (record-delete): New arg record_markers.
(record_marker_adjustment): No longer needed outside undo.c.
* insdel.c (adjust_markers_for_delete): Move calculation of marker
adjustments to undo.c's record_marker_adjustments.  Note that
fileio.c's decide_coding_unwind is another caller to
adjust_markers_for_delete.  Because it has undo list bound to t,
it does not rely on adjust_markers_for_delete to record marker
adjustments.
(del_range_2): Swap call to record_delete and
adjust_markers_for_delete so as undo marker adjustments are
recorded before current deletion's adjustments, as before.
(adjust_after_replace):
(replace_range): Pass value for new record_markers arg to
delete_record.
* undo.c (record_marker_adjustment): Renamed to
record_marker_adjustments and made static.
(record_delete): Check record_markers arg and call
record_marker_adjustments.
(record_change): Pass value for new record_markers arg to
delete_record.
(record_point): at_boundary calculation no longer needs to account
for marker adjustments.

* undo-tests.el (undo-test-marker-adjustment-nominal):
(undo-test-region-t-marker): New tests of marker adjustments.
(undo-test-marker-adjustment-moved):
(undo-test-region-mark-adjustment): New tests to demonstrate
bug#16818, which fail without the fix.

* markers.texi (Moving Marker Positions): The 2014-03-02 doc
change mentioning undo's inability to handle relocated markers no
longer applies.  See bug#16818.
* text.texi (Undo): Expand documentation of (TEXT . POS) and
(MARKER . ADJUSTMENT) undo elements.
2014-03-24 22:47:39 -04:00
Stefan Monnier
f6614a4770 * lisp/simple.el (redisplay-highlight-region-function): Increase priority of
overlay to make sure boundaries are visible.
* src/buffer.c (struct sortvec): Add field `spriority'.
(compare_overlays): Use it.
(sort_overlays): Set it.

Fixes: debbugs:15899
2014-03-23 18:30:47 -04:00
Glenn Morris
f9c81e7b48 Include interactive-only information in describe-function output
* lisp/help-fns.el (help-fns--interactive-only): New function.
(help-fns-describe-function-functions): Add the above function.

* lisp/simple.el (beginning-of-buffer, end-of-buffer, insert-buffer)
(next-line, previous-line): Remove hand-written interactive-only
information from doc strings, it is auto-generated now.

* lisp/bookmark.el (bookmark-write):
* lisp/epa-mail.el (epa-mail-decrypt, epa-mail-verify, epa-mail-sign)
(epa-mail-import-keys): Mark interactive-only,
and remove hand-written interactive-only information from doc strings.

* lisp/epa.el (epa-decrypt-armor-in-region, epa-verify-region)
(epa-verify-cleartext-in-region, epa-sign-region, epa-encrypt-region):
* lisp/files.el (not-modified):
* lisp/simple.el (mark-whole-buffer): Mark interactive-only.

* doc/lispref/commands.texi (Defining Commands):
Mention that interactive-only also affects describe-function.

* etc/NEWS: Mention this.
2014-03-22 15:36:29 -07:00
Glenn Morris
5076d27513 Allow `declare' to set the interactive-only property
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist):
Add interactive-only.  Doc tweak.
(macro-declarations-alist): Doc tweak.

* lisp/subr.el (declare): Doc tweak (add xref to manual).

* lisp/comint.el (comint-run):
* lisp/files.el (insert-file-literally, insert-file):
* lisp/replace.el (replace-string, replace-regexp):
* lisp/simple.el (beginning-of-buffer, end-of-buffer, delete-backward-char)
(delete-forward-char, goto-line, insert-buffer, next-line)
(previous-line): Set interactive-only via declare.

* doc/lispref/functions.texi (Declare Form): Add interactive-only.

* doc/lispref/commands.texi (Defining Commands) Mention declare.

* etc/NEWS: Mention this.
2014-03-22 15:12:52 -07:00
Stefan-W. Hahn
6a72e40553 * lisp/ps-print.el (ps-generate-postscript-with-faces):
Explicitly deactivate the mark.
* lisp/simple.el (deactivate-mark): Update region highlight.

Fixes: debbugs:16866
2014-03-19 15:12:50 -04:00
Stefan Monnier
ac9b4703e1 * lisp/simple.el (newline-and-indent): Do autofill.
Fixes: debbugs:17031
2014-03-18 16:49:24 -04:00
Dmitry Gutov
50d434d198 Support the old `blink-matching-paren' behavior
* lisp/simple.el (blink-matching-paren): Describe the new value,
`jump', enabling the old behavior.
(blink-matching-open): Use that value.

Fixes: debbugs:17008
2014-03-14 20:01:39 +02:00
Stefan Monnier
536a17e3c6 * lisp/simple.el (set-mark): Ensure mark-active is nil if the mark is nil.
Deactivate the mark before setting it to nil.
(activate-mark): Do nothing if region is already active.

Fixes: debbugs:16975
2014-03-11 13:10:07 -04:00
Glenn Morris
03bc753ef6 * lisp/simple.el (newline): Doc tweak.
* etc/NEWS: Related edit.
2014-03-05 20:11:08 -08:00
Michal Nazarewicz
5b87d0d9cd * binding.el: Add comment describing why C-d binds to `delete-char'.
* lisp/simple.el (delete-forward-char): Mark as interactive-only.
* src/cmds.c (delete-char): Update docstring pointing out that the
function ignores `delete-active-region' and `overwrite-mode'.
2014-03-03 22:14:11 -05:00
Barry O'Reilly
e3d090b4c5 * simple.el (undo-elt-in-region): Fix buffer corruption for edge
case of undo in region.
* automated/undo-tests.el (undo-test-in-region-not-most-recent):
Add new test of undo in region.
(undo-test-in-region-eob): Add test case described at
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16411#41
2014-03-02 12:37:32 -05:00
Glenn Morris
84fc911dcc * lisp/subr.el (with-wrapper-hook): Tweak obsolescence message.
* lisp/simple.el: Remove mistaken FIXME comment.

* etc/NEWS: Markup.
2014-02-28 19:54:47 -08:00
Juanma Barranquero
bed5126f52 lisp/simple.el (choose-completion): Fix docstring typo.
(read-quoted-char-radix): Remove unneeded * in docstring.
(process-file, kill-whole-line, pop-to-mark-command, set-mark-command):
Don't escape parentheses unnecessarily in docstrings.
2014-02-21 14:22:14 +01:00
Lars Ingebrigtsen
e3692ee034 * simple.el (choose-completion): Doc fix.
Fixes: debbugs:14160
2014-02-09 22:58:34 -08:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Lars Ingebrigtsen
54dd147ac3 (execute-extended-command): Clarify doc string (bug#13373). 2014-02-08 05:13:46 -08:00
Lars Ingebrigtsen
18c6aa8c86 * simple.el (choose-completion-string-functions): Document fix.
New calling convention.

Fixes: debbugs:14153
2014-02-08 04:46:09 -08:00
Lars Ingebrigtsen
6ef4f3cef2 * simple.el (line-move): Document utility function used many
places in the Emacs sources.

Fixes: debbugs:14843
2014-02-07 22:28:12 -08:00
Juanma Barranquero
e255a70376 * lisp/simple.el (quoted-insert): Check character validity (bug#16677). 2014-02-07 12:13:31 +01:00
Glenn Morris
2b568bc90b Move iswitchb.el to obsolete/
Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00501.html

* lisp/obsolete/iswitchb.el: Move to obsolete/.

* lisp/simple.el (iswitchb-mode): Add manual autoloads to ease transition,
since obsolete/ is not scanned for autoloads.

* lisp/emacs-lisp/authors.el (authors-valid-file-names):
Add iswitchb.el.

* doc/emacs/ack.texi (Acknowledgments): No longer mention obsolete files.

* doc/misc/viper.texi (File and Buffer Handling): Prefer ido to iswitchb.

* etc/NEWS: Related edits.
2014-02-06 19:22:34 -08:00
Glenn Morris
6bbc0c845f * lisp/simple.el (eval-expression): Doc fix.
* etc/NEWS: Add missing entry.
2014-01-29 23:48:06 -08:00
Glenn Morris
5e61c1ef5c Some doc for cycle-spacing
* lisp/simple.el (just-one-space, cycle-spacing): Doc fixes.

* doc/emacs/killing.texi (Deletion): Mention cycle-spacing.

* doc/lispref/text.texi: Comment.

* etc/NEWS: Related edits.
2014-01-29 00:27:55 -08:00
Glenn Morris
1670e27f38 Doc fixes related to zero prefix argument of eval-expression etc
* emacs-lisp/lisp-mode.el (eval-print-last-sexp, eval-last-sexp):
* simple.el (eval-expression): Doc fixes.
2014-01-22 23:53:56 -08:00
Leo Liu
8750379121 * simple.el (read--expression): Don't enable eldoc-mode. 2014-01-21 09:58:16 +08:00
Stefan Monnier
6cc750eec4 * lisp/simple.el (move-beginning-of-line): Make sure we don't move forward.
Fixes: debbugs:16497
2014-01-20 14:15:10 -05:00
Paul Eggert
9a685cf6bd * simple.el (password-word-equivalents): Remove duplicates.
Sort, to make this easier next time.
Downcase.  Omit ": " after "jelszó".
2014-01-18 14:23:38 -08:00
Chong Yidong
681ce5d251 Fix Bug#13124.
* simple.el (password-word-equivalents): New defcustom.
* comint.el (comint-password-prompt-regexp): Use it.  Bump version to 24.4.
(comint-watch-for-password-prompt): Let-bind `case-fold-search' to t.
2014-01-17 17:45:45 +01:00
Bastien Guerry
502963bbf2 Revert 2014-01-17T13:05:09Z!bzg@gnu.org. 2014-01-17 15:58:34 +01:00
Bastien Guerry
2afb07b2e1 * simple.el (define-alternatives): Fix docstring by advising
developers to (defvar COMMAND-alternatives).
2014-01-17 14:05:09 +01:00
Nicolas Richard
dac696602d simple.el (define-alternatives): Add 'definition-name to COMMAND-alternatives
* simple.el (define-alternatives): When creating the
COMMAND-alternatives variable, assign COMMAND as its definition
name so that `describe-variable' can relocate it.

See http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01340.html
2014-01-14 23:30:42 +01:00
Bastien Guerry
7199b6d4f8 Fix/enhance `define-alternatives' docstring again 2014-01-13 23:24:29 +01:00
Bastien Guerry
e3f33e5dbb `define-alternatives' bugfix and UI enhancement
* simple.el (define-alternatives): Call the selected command
interactively.  When setting `COMMAND--implementation' for the
first time, tell the user how to chose another implementation.
Enhance the docstring.
2014-01-13 23:13:44 +01:00
Leo Liu
9b335362d0 Re-implement the feature of showing eldoc info after editing.
* emacs-lisp/eldoc.el (eldoc-post-insert-mode): Remove.
(eldoc-edit-message-commands): New function.
(eldoc-print-after-edit): New variable.
(eldoc-pre-command-refresh-echo-area): Emit message only by
eldoc-message-commands.
(eldoc-mode): Restrict eldoc-message-commands to editing commands
if eldoc-print-after-edit is set. 

* progmodes/octave.el (octave-mode-menu): Adapt to change in
eldoc.

Fixes: debbugs:16346
2014-01-12 12:00:03 +08:00
Stefan Monnier
684d44ef81 * lisp/simple.el (deactivate-mark, activate-mark): Force-mode-line-update.
(activate-mark): Add `no-tmm' argument.
(set-mark, push-mark-command): Use it instead of running
activate-mark-hook by hand.

Fixes: debbugs:16382
2014-01-08 20:59:19 -05:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Glenn Morris
9c5a5c7700 Every defcustom should specify its type
* apropos.el (apropos-match-face):
* calculator.el (calculator-displayer):
* dabbrev.el (dabbrev-search-these-buffers-only):
* face-remap.el (buffer-face-mode-face):
* simple.el (yank-handled-properties):
* emacs-lisp/testcover.el (testcover-potentially-1value-functions):
* mail/footnote.el (footnote-mode-line-string, footnote-prefix):
* mail/hashcash.el (hashcash-accept-resources, hashcash-program)
(hashcash-double-spend-database):
* progmodes/ruby-mode.el (ruby-deep-indent-paren)
(ruby-deep-indent-paren-style):
* textmodes/flyspell.el (flyspell-auto-correct-binding):
* textmodes/rst.el (rst-toc-indent, rst-toc-insert-style)
(rst-toc-insert-number-separator, rst-toc-insert-max-level):
* vc/pcvs-defs.el (cvs-minor-mode-prefix):
* erc/erc-log.el (erc-log-file-coding-system):
* gnus/gnus-sieve.el (gnus-sieve-select-method):
* gnus/gravatar.el (gravatar-automatic-caching, gravatar-cache-ttl)
(gravatar-rating, gravatar-size):
* gnus/message.el (message-minibuffer-local-map):
* gnus/sieve-manage.el (sieve-manage-authenticators)
(sieve-manage-authenticator-alist):
Specify custom types.

* mail/hashcash.el (hashcash-program): Rename from hashcash-path.
Update callers.
2013-12-28 00:21:33 -08:00
João Távora
3b8d5131a3 Make Electric Pair mode smarter/more useful:
* lisp/electric.el: Pairing/skipping helps preserve
  balance. Autobackspacing behaviour. Opens extra newlines between
  pairs. Skip whitespace before closing delimiters.

* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Use new
  features.

* test/automated/electric-tests.lisp: New file.

* doc/emacs/programs.texi: Describe new features.

* lisp/simple.el: Pass non-nil interactive arg to newline call inside
  newline-and-indent.
2013-12-26 22:02:49 +00:00
Chong Yidong
8cd22a0818 Rename set-temporary-overlay-map -> set-transient-map
* lisp/subr.el (set-transient-map): Rename from
set-temporary-overlay-map.  Doc fix.

* lisp/face-remap.el (text-scale-adjust):
* lisp/indent.el (indent-rigidly):
* lisp/kmacro.el (kmacro-call-macro):
* lisp/minibuffer.el (minibuffer-force-complete):
* lisp/repeat.el (repeat):
* lisp/simple.el (universal-argument--mode):
* lisp/calendar/todo-mode.el (todo-insert-item--next-param):
* lisp/progmodes/f90.el (f90-abbrev-start): Callers changed.

* lisp/org/org.el (orgstruct-make-binding): Call set-transient-map
instead of old name set-temporary-overlay-map.

* doc/lispref/keymaps.texi (Controlling Active Maps): Renamed
set-temporary-overlay-map to set-transient map.  Doc fixes.
(Searching Keymaps): The transient keymap takes precedence.
2013-12-23 11:59:10 +08:00
Richard M. Stallman
b51ad4cf0a Document how to make RET not indent.
* simple.el (newline): Doc fix.
2013-12-21 17:55:59 -05:00
Juri Linkov
b41594fd4d * lisp/simple.el (eval-expression-print-format): Don't check for
command names and the last command.  Always display additional
formats of the integer result in the echo area, and insert them
to the current buffer only with a zero prefix arg.
Display character when char-displayable-p is non-nil.
(eval-expression): With a zero prefix arg, set `print-length' and
`print-level' to nil, and insert the integer values from
`eval-expression-print-format' at the end.  Doc fix. 

* lisp/emacs-lisp/lisp-mode.el (eval-print-last-sexp): Add arg
`eval-last-sexp-arg-internal'.  Doc fix.
(eval-last-sexp-1): Pass arg `eval-last-sexp-arg-internal' to
`eval-last-sexp-print-value'.  Doc fix.
(eval-last-sexp-print-value): Add arg `eval-last-sexp-arg-internal'.
Set `print-length' and `print-level' to nil when arg is zero.
(eval-last-sexp): Doc fix.
(eval-defun-2): Print the integer values from
`eval-expression-print-format' at the end.

* lisp/emacs-lisp/edebug.el (edebug-eval-defun): Print the integer
values from `eval-expression-print-format' at the end.

* lisp/ielm.el (ielm-eval-input): Print the integer
values from `eval-expression-print-format' at the end.

Fixes: debbugs:12985
2013-12-19 23:02:46 +02:00
Chong Yidong
33f5d4c15a * simple.el (append-next-kill): Doc fix (Bug#15995, Bug#16016). 2013-12-18 10:43:47 +08:00
Dima Kogan
76da345537 * simple.el (kill-region): Pass mark first then point, so kill-append works right.
(copy-region-as-kill, kill-ring-save): Likewise.

Fixes: debbugs:12819
2013-12-17 23:48:26 +08:00
Dmitry Gutov
84c73ba099 Make blink-matching-paren perform blinking without moving the cursor
* lisp/faces.el (paren-showing-faces, show-paren-match)
(show-paren-mismatch): Move from paren.el.

* lisp/simple.el (blink-matching--overlay): New variable.
(blink-matching-open): Instead of moving point, highlight the
matching paren with an overlay
(http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00333.html).
2013-12-13 06:14:17 +02:00