1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00
Commit Graph

1594 Commits

Author SHA1 Message Date
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
Juri Linkov
4a9c6865cb * lisp/simple.el <Keypad support>: Remove key bindings duplicated with bindings.el.
Fixes: debbugs:14397
2013-12-13 03:03:04 +02:00
Stefan Monnier
afdadaf7b6 * lisp/simple.el (normal-erase-is-backspace-mode): Map kp-delete identically
to `delete'.

Fixes: debbugs:16109
2013-12-11 09:22:26 -05:00
Juri Linkov
9139632a34 * lisp/window.el (display-buffer-no-window): New action function.
(display-buffer-alist, display-buffer): Doc fix.  (Bug#13594)

* lisp/simple.el (shell-command): Add window alist entry `allow-no-window'
to `display-buffer'.
(async-shell-command): Doc fix.

* lisp/progmodes/compile.el (compilation-start): Rename window alist
entry `no-display-ok' to `allow-no-window'.

* doc/lispref/windows.texi (Choosing Window): Rename `no-display-ok' to
`allow-no-window'.
2013-12-03 03:19:24 +02:00
Stefan Monnier
fb651d155a * lisp/simple.el (newline): Mention `electric-indent-mode'.
Fixes: debbugs:16015
2013-12-01 10:59:17 -05:00
Glenn Morris
3e2fb4db3f Make the interactive-only' bytecomp warning like the obsolete' one
* emacs-lisp/bytecomp.el (byte-compile-form):
Make the `interactive-only' warning like the `obsolete' one.

* comint.el (comint-run):
* files.el (insert-file-literally, insert-file):
* replace.el (replace-string, replace-regexp):
* simple.el (beginning-of-buffer, end-of-buffer, delete-backward-char)
(goto-line, insert-buffer, next-line, previous-line):
Tweak `interactive-only' spec.
2013-11-30 00:42:28 -08:00
Bozhidar Batsov
2bb3a748b3 * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
Mark as obsolete and replace it with a symbol property.
(byte-compile-form): Use new 'interactive-only property.
* lisp/comint.el, lisp/files.el, lisp/replace.el, lisp/simple.el:
Apply new 'interactive-only properly.
2013-11-25 19:16:32 +02:00
Stefan Monnier
ae4002ce29 Cleanup namespace of dos-w32.el.
* lisp/dos-w32.el (minibuffer-history-case-insensitive-variables)
(path-separator, null-device, buffer-file-coding-system)
(lpr-headers-switches): Check system-type before modifying them.
(find-buffer-file-type-coding-system): Mark obsolete.
(w32-find-file-not-found-set-buffer-file-coding-system): Rename from
find-file-not-found-set-buffer-file-coding-system.
(w32-untranslated-filesystem-list, w32-untranslated-canonical-name):
(w32-add-untranslated-filesystem, w32-remove-untranslated-filesystem)
(w32-direct-print-region-use-command-dot-com, w32-untranslated-file-p):
(w32-direct-print-region-helper, w32-direct-print-region-function)
(w32-direct-ps-print-region-function): Rename by adding a "w32-" prefix.
* lisp/startup.el (normal-top-level-add-subdirs-to-load-path):
* lisp/ps-print.el (ps-print-region-function):
* lisp/lpr.el (print-region-function): Use new name.

* lisp/simple.el (copy-region-as-kill): Fix call to region-extract-function.

* lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add new `2-and' handler.
(byte-compile-and-folded): New function.
(=, <, >, <=, >=): Use it.
2013-10-29 22:45:53 -04:00
Stefan Monnier
53b39e8977 * lisp/subr.el (custom-declare-variable-early): Remove function.
(custom-declare-variable-list): Remove var.
(error, user-error): Remove `while' loop.
(read-quoted-char-radix, read-quoted-char): Move to simple.el.
(user-emacs-directory-warning, locate-user-emacs-file):
Move to files.el.
* lisp/simple.el (read-quoted-char-radix, read-quoted-char):
* lisp/files.el (user-emacs-directory-warning, locate-user-emacs-file):
Move from subr.el.
* lisp/custom.el (custom-declare-variable-list): Don't process
custom-declare-variable-list.
2013-10-29 22:14:16 -04:00
Stefan Monnier
3472b6c682 Add pre-redisplay-function and rectangular region
* lisp/rect.el: Use lexical-binding.  Add new rectangular region support.
(rectangle-mark): New command.
(rectangle--region): New var.
(deactivate-mark-hook): Reset rectangle--region.
(rectangle--extract-region, rectangle--insert-for-yank)
(rectangle--highlight-for-redisplay)
(rectangle--unhighlight-for-redisplay): New functions.
(region-extract-function, redisplay-unhighlight-region-function)
(redisplay-highlight-region-function): Use them to handle
rectangular region.
* lisp/simple.el (region-extract-function): New var.
(delete-backward-char, delete-forward-char, deactivate-mark): Use it.
(kill-new, kill-append): Remove obsolete `yank-handler' argument.
(kill-region): Replace obsolete `yank-handler' arg with `region'.
(copy-region-as-kill, kill-ring-save): Add `region' argument.
(redisplay-unhighlight-region-function)
(redisplay-highlight-region-function): New vars.
(redisplay--update-region-highlight): New function.
(pre-redisplay-function): Use it.
(exchange-point-and-mark): Don't deactivate the mark before
reactivate-it anyway.
* lisp/comint.el (comint-kill-region): Remove yank-handler argument.
* lisp/delsel.el (delete-backward-char, backward-delete-char-untabify)
(delete-char): Remove property, since it's now part of their
default behavior.
(self-insert-iso): Remove property since this command doesn't exist.

* src/xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
(syms_of_xdisp): Declare pre-redisplay-function.
(markpos_of_region): Remove function.
(init_iterator, compute_stop_pos, handle_face_prop)
(face_before_or_after_it_pos, reseat_to_string)
(get_next_display_element, window_buffer_changed)
(redisplay_internal, try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, try_window_id, display_line)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(display_string, mouse_face_from_buffer_pos): Remove region handling.
* src/window.h (struct window): Remove field `region_showing'.
* src/dispextern.h (struct it): Remove region_beg/end_charpos.
(face_at_buffer_position, face_for_overlay_string)
(face_at_string_position): Update prototypes.
* src/xfaces.c (face_at_buffer_position, face_for_overlay_string)
(face_at_string_position): Remove `region_beg' and `region_end' args.
* src/fontset.c (Finternal_char_font):
* src/font.c (font_at, font_range): Adjust calls accordingly.
* src/insdel.c (Qregion_extract_function): New var.
(syms_of_insdel): Initialize it.
(prepare_to_modify_buffer_1): Use it.
2013-10-29 12:11:50 -04:00
Eli Zaretskii
fbfd0e1d75 Fix bug #15712 with vertical motion when the goal column needs to hscroll.
lisp/simple.el (line-move): Call line-move-1 instead of
 line-move-visual when the current window hscroll is zero, but
 temporary-goal-column indicates we will need to hscroll as result
 of the movement.
2013-10-25 12:45:51 +03:00
Stefan Monnier
914b7f9808 * lisp/simple.el (newline): Only run post-self-insert-hook when
called interactively.
2013-10-19 18:17:56 -04:00
Glenn Morris
c440407a90 * lisp/simple.el (x-selection-owner-p, x-selection-exists-p): Declare. 2013-09-19 16:31:26 -04:00
Glenn Morris
e740f9d245 Silence some --without-x compilation warnings
* custom.el (x-get-resource): Declare.

* frame.el (x-display-grayscale-p): Declare.

* simple.el (font-info): Declare.

* window.el (x-display-pixel-height, tool-bar-lines-needed): Declare.
(fit-frame-to-buffer): Explicit error if --without-x.
(mouse-autoselect-window-select): Silence compiler.
2013-09-17 19:50:04 -07:00
Glenn Morris
2b42da9837 * lisp/simple.el (messages-buffer-mode-map): Unbind "g". 2013-09-17 16:27:10 -04:00
Glenn Morris
90582f05bc Add a major-mode for the *Messages* buffer
Ref: http://lists.gnu.org/archive/html/emacs-devel/2010-02/msg00135.html

* lisp/simple.el (messages-buffer-mode): New major mode.
(messages-buffer): New function.

* lisp/startup.el (normal-top-level): Switch mode of *Messages* buffer.

* src/xdisp.c (message_dolog): If we create *Messages*,
switch it to messages-buffer-mode.

* lisp/emacs-lisp/ert.el (ert--force-message-log-buffer-truncation)
(ert-run-test): Use `message-buffer' function.
(ert--force-message-log-buffer-truncation): Ignore read-only.

* lisp/help.el (view-echo-area-messages): Use `message-buffer' function.

* lisp/mail/emacsbug.el (report-emacs-bug): Use `message-buffer' function.

* lisp/gnus/gnus-util.el (gnus-message-with-timestamp-1):
Use `message-buffer' function if available.  Ignore read-only.

* etc/NEWS: Mention this.
2013-09-17 00:39:54 -07:00
Stefan Monnier
02ef6c1a8a * lisp/simple.el: Use set-temporary-overlay-map for universal-argument.
(universal-argument-map): Don't use default-bindings.
Bind switch-frame explicitly.  Replace universal-argument-minus with
a conditional binding.
(universal-argument-num-events, saved-overriding-map): Remove.
(restore-overriding-map): Remove.
(universal-argument--mode): Rename from save&set-overriding-map,
and rewrite.
(universal-argument, universal-argument-more, negative-argument)
(digit-argument): Adjust accordingly.
(universal-argument-minus): Remove.
(universal-argument-other-key): Remove.
2013-09-10 13:13:48 -04:00
Glenn Morris
9a2c9b4764 * lisp/simple.el (read-minibuffer): Unbreak it.
Fixes: debbugs:15318
2013-09-10 00:21:19 -07:00
Stefan Monnier
f663baa7dd * lisp/simple.el (repeat-complex-command--called-interactively-skip):
New function.
(repeat-complex-command): Use it.

Fixes: debbugs:14136
2013-08-28 17:19:54 -04:00
Xue Fuqiao
907699465f Reverse previous change, because kill-{new, append} don't have obvious advantage. 2013-08-16 16:27:49 +08:00
Xue Fuqiao
7bef426b5f Advertise using kill-new' and kill-append' in Lisp programs.
* lisp/simple.el (copy-region-as-kill, kill-ring-save): Advertise using
`kill-new' and `kill-append' in Lisp programs.
2013-08-16 16:11:44 +08:00
Xue Fuqiao
f73f4ce69f Doc fix for forward-word and backward-word.
* doc/lispref/positions.texi (Word Motion): Remove redundant sentence.
* lisp/simple.el (backward-word): Mention the optional argument.
* src/syntax.c (forward_word): Mention the optional argument.
2013-08-13 22:26:39 +08:00
Stefan Monnier
54bd972f15 * lisp/subr.el (define-error): New function.
* doc/lispref/control.texi (Signaling Errors): Refer to define-error.
(Error Symbols): Add `define-error'.
* doc/lispref/errors.texi (Standard Errors): Don't refer to `error-conditions'.
* lisp/progmodes/ada-xref.el (ada-error-file-not-found): Rename from
error-file-not-found and define with define-error.
* lisp/emacs-lisp/cl-lib.el (cl-assertion-failed): Move here from subr.el
and define with define-error.
* lisp/userlock.el (file-locked, file-supersession):
* lisp/simple.el (mark-inactive):
* lisp/progmodes/js.el (js-moz-bad-rpc, js-js-error):
* lisp/progmodes/ada-mode.el (ada-mode-errors):
* lisp/play/life.el (life-extinct):
* lisp/nxml/xsd-regexp.el (xsdre-invalid-regexp, xsdre-parse-error):
* lisp/nxml/xmltok.el (xmltok-markup-declaration-parse-error):
* lisp/nxml/rng-util.el (rng-error):
* lisp/nxml/rng-uri.el (rng-uri-error):
* lisp/nxml/rng-match.el (rng-compile-error):
* lisp/nxml/rng-cmpct.el (rng-c-incorrect-schema):
* lisp/nxml/nxml-util.el (nxml-error, nxml-file-parse-error):
* lisp/nxml/nxml-rap.el (nxml-scan-error):
* lisp/nxml/nxml-outln.el (nxml-outline-error):
* lisp/net/soap-client.el (soap-error):
* lisp/net/gnutls.el (gnutls-error):
* lisp/net/ange-ftp.el (ftp-error):
* lisp/mpc.el (mpc-proc-error):
* lisp/json.el (json-error, json-readtable-error, json-unknown-keyword)
(json-number-format, json-string-escape, json-string-format)
(json-key-format, json-object-format):
* lisp/jka-compr.el (compression-error):
* lisp/international/quail.el (quail-error):
* lisp/international/kkc.el (kkc-error):
* lisp/emacs-lisp/ert.el (ert-test-failed):
* lisp/calc/calc.el (calc-error, inexact-result, math-overflow)
(math-underflow):
* lisp/bookmark.el (bookmark-error-no-filename):
* lisp/epg.el (epg-error): Define with define-error.
2013-08-09 17:22:44 -04:00