1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

411 Commits

Author SHA1 Message Date
Paul Eggert
34871865de Fix the desired binding for comment-line
* bindings.el (ctl-x-map): Use [?\C-\;] to get the desired binding.
Fixes: bug#19826
2015-02-22 22:00:26 -08:00
Paul Eggert
1cb3428546 * bindings.el (ctl-x-map): There is no 'C-;'.
For now, make do with 'M-;'; this allows 'make bootstrap' to work.
Perhaps some other binding should be chosen.
Fixes: bug#19826
2015-02-21 12:54:58 -08:00
Artur Malabarba
48415204e8 bindings.el (ctl-x-map): Fix `comment-line' binding. 2015-02-21 18:06:07 -02:00
Artur Malabarba
97cb255360 newcomment.el (comment-line): New command on C-x C-;. 2015-02-08 19:03:17 -02:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Juri Linkov
5c0fbcfc8a Use <up> and <down> keys to move point in the multi-line minibuffer.
* lisp/bindings.el (minibuffer-local-map): Rebind [down] from
next-history-element to next-line-or-history-element, and [up]
from previous-history-element to previous-line-or-history-element.

* lisp/simple.el (next-line-or-history-element)
(previous-line-or-history-element): New commands.

http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg00822.html
2014-11-18 23:33:42 +02:00
Lars Magne Ingebrigtsen
29f81b9588 * lisp/bindings.el (search-map): Move eww-search-words' to M-s M-w'. 2014-11-17 19:46:51 +01:00
Eli Zaretskii
3e517d349b Fix error preloading bindings.el.
lisp/bindings.el (search-map): Fix last change: don't use 'kbd' in
 bindings.el, since it is not yet loaded when bindings.el is preloaded.
2014-11-14 08:14:06 +02:00
Kenjiro NAKAYAMA
3bdc6ce7e3 Bind M-s M-s' globally to eww-search-words'
Fixes: debbugs:16258

* etc/NEWS: Mention the new `M-s M-s' keystroke.

* lisp/bindings.el (search-map): Bind M-s M-s to `eww-search-words'.

* net/eww.el (eww-search-words): New command.
2014-11-14 04:46:11 +01:00
Glenn Morris
f6c951e5d2 Small fixes re toggle-read-only, mainly doc
* progmodes/hideif.el (hide-ifdef-mode-submap): Also substitute read-only-mode.

* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* files.el (view-read-only, find-file-read-only)
(find-file-read-only-other-window)
(find-file-read-only-other-frame):
* progmodes/hideif.el (hide-ifdef-toggle-outside-read-only):
Doc fixes re toggle-read-only.

* view.el: Comment updates.
2014-07-21 01:38:17 -04:00
Eli Zaretskii
b20759f920 Fix bug #17986 with infloop in redisplay when default-directory is nil.
src/xdisp.c (decode_mode_spec): Call file-remote-p on the current
 buffer's default-directory only if it is a string.

 lisp/bindings.el (mode-line-remote): If default-directory is not a
 string, don't call file-remote-p on it; instead state in the
 help-echo that it is nil.
2014-07-13 17:49:59 +03:00
Juri Linkov
5be5f2854a * lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to characters.
Fixes: debbugs:17759
2014-06-14 12:50:13 +03:00
Stefan Monnier
494ec1e71d * lisp/electric.el (electric-newline-and-maybe-indent): New command.
Bind it globally to C-j.
(electric-indent-mode): Don't mess with the global map any more.
Don't drop the post-self-insert-hook is some buffer is still using it.
* lisp/bindings.el (global-map): Remove C-j binding.

Fixes: debbugs:16770
2014-03-20 13:14:45 -04: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
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Leo Liu
b9e20952ea * bindings.el (visual-order-cursor-movement): Fix version.
* indent.el (indent-region): Disable progress reporter in
minibuffer.

Fixes: debbugs:16108
2013-12-13 09:54:09 +08: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
Juri Linkov
c1916ff5b8 * lisp/bindings.el: Map kp keys to non-kp keys systematically
with basic modifiers control, meta and shift.

Fixes: debbugs:14397
2013-12-11 02:45:10 +02:00
Stefan Monnier
7818df11b8 * lisp/bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
* src/keyboard.c (command_loop_1): Use region-extract-function.
* src/insdel.c (Qregion_extract_function): Not static any more (can we
stop pretending that these vars can benefit from being marked static?).
2013-11-11 00:18:53 -05:00
Juanma Barranquero
2805a6512b * lisp/bindings.el (ctl-x-r-map): Bind ?f to frameset-to-register.
* lisp/register.el: Add support for framesets.
  (frameset-frame-id, frameset-frame-with-id)
  (frameset-p, frameset-restore, frameset-save): Declare.
  (register-alist): Document framesets.
  (frameset-session-filter-alist): Declare.
  (frameset-to-register): New function.
  (jump-to-register): Implement jumping to framesets.  Doc fix.
  (describe-register-1): Describe framesets.
2013-08-08 02:44:22 +02:00
Eli Zaretskii
0ba54312c9 Don't call sit-for in right-char and left-char for visual cursor motion.
src/xdisp.c (Fmove_point_visually): Invalidate the cursor position
 when moving point by using the current glyph matrix.  This avoids
 the need to force redisplay when this function is called in a
 loop.

 lisp/bindings.el (right-char, left-char): Don't call sit-for, this is
 no longer needed.  Use arithmetic comparison only for numerical
 arguments.
2013-06-30 17:49:33 +03:00
Eli Zaretskii
7900732126 Minor fix in right-char and left-char, per Stefan's comments. 2013-06-29 18:20:46 +03:00
Eli Zaretskii
4c672a0fec Implement visual-order cursor motion.
src/xdisp.c (Fmove_point_visually): New function.

 lisp/bindings.el (visual-order-cursor-movement): New defcustom.
 (right-char, left-char): Provide visual-order cursor motion by
 calling move-point-visually.  Update the doc strings.

 doc/emacs/basic.texi (Moving Point): Document visual-order-cursor-movement
 and its effect on right-char and left-char.

 doc/lispref/display.texi (Bidirectional Display): Document move-point-visually.

 etc/NEWS: Document the new feature.
2013-06-29 16:36:19 +03:00
Juri Linkov
e5e4a94293 Search and highlight symbol at point.
* doc/emacs/display.texi (Highlight Interactively): Add global keybindings
with the key prefix `M-s h'.  Document old command `highlight-phrase'.
Document new command `highlight-symbol-at-point'.

* lisp/bindings.el (search-map): Bind `highlight-symbol-at-point' to
`M-s h .'. 

* lisp/hi-lock.el (highlight-symbol-at-point): New alias for the new
command `hi-lock-face-symbol-at-point'.
(hi-lock-face-symbol-at-point): New command.
(hi-lock-map): Bind `highlight-symbol-at-point' to `C-x w .'.
(hi-lock-menu): Add `highlight-symbol-at-point'.
(hi-lock-mode): Doc fix.

* lisp/isearch.el (isearch-forward-symbol-at-point): New command.
(search-map): Bind `isearch-forward-symbol-at-point' to `M-s .'.
(isearch-highlight-regexp): Add a regexp which matches
words/symbols for word/symbol mode.

* lisp/subr.el (find-tag-default-bounds): New function with the body
mostly moved from `find-tag-default'.
(find-tag-default): Move most code to `find-tag-default-bounds',
call it and apply `buffer-substring-no-properties' afterwards.

Fixes: debbugs:14427
2013-06-03 11:51:50 +03:00
Leo Liu
29f4782278 Add an additional key ? for describe-prefix-bindings 2013-04-18 10:20:12 +08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Stefan Monnier
10766e9eb2 * lisp/bindings.el (mode-line-toggle-read-only, mode-line-toggle-modified)
(mode-line-widen, mode-line-input-method-map)
(mode-line-coding-system-map, mode-line-remote)
(mode-line-unbury-buffer, mode-line-bury-buffer)
(mode-line-next-buffer, mode-line-previous-buffer):
Replace save-selected-window+select-window => with-selected-window.
2012-10-09 02:41:07 -04:00
Chong Yidong
d39d3c8e5f * lisp/bindings.el (goto-map): Bind M-g TAB to move-to-column. 2012-09-30 16:35:11 +08:00
Chong Yidong
9a93067632 Convert toggle-read-only calls to read-only-mode.
* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* ibuffer.el (ibuffer-do-toggle-read-only): Use read-only-mode.
2012-09-23 18:21:34 +08:00
Glenn Morris
2a1e24765b Replace version 24.2 with 24.3 where appropriate (hopefully) 2012-08-15 09:29:11 -07:00
Stefan Monnier
ba10c48cc6 * lisp/ibuffer.el (ibuffer-do-toggle-read-only):
* lisp/dired.el (dired-toggle-read-only):
* lisp/buff-menu.el (Buffer-menu-toggle-read-only):
* lisp/bindings.el (mode-line-toggle-read-only):
* lisp/bs.el (bs-toggle-readonly): Call toggle-read-only interactively.
2012-08-12 13:29:53 -04:00
Chong Yidong
e1293765d9 Bind M-= back to count-words-region, and let it accept a prefix arg.
* lisp/bindings.el: Bind M-= back to count-words-region.

* lisp/simple.el (count-words-region): Accept a prefix arg for acting
on the entire buffer.
(count-words--buffer-message): New helper function.
2012-08-11 00:02:48 +08:00
Chong Yidong
0fe776a1e4 * lisp/bindings.el: Bind M-= to count-words. 2012-07-18 22:17:49 +08:00
Reuben Thomas
be755c79bd * rect.el (copy-rectangle-as-kill): New command.
* lisp/rect.el, lisp/register.el: Move bindings to bindings.el.

* lisp/bindings.el: Consolidate ctl-x-r-map bindings.  Bind
copy-rectangle-as-kill to C-x r w.

Fixes: debbugs:739
2012-07-14 10:19:07 +08:00
Juanma Barranquero
80185fed36 lisp/bindings.el (top): Use mapc' instead of mapcar'. 2012-07-13 19:02:18 +02:00
Chong Yidong
dea31bd311 Give permanent-local property to per-buffer variables without defaults.
* doc/emacs/custom.texi (Examining): Update C-h v message.

* lisp/bindings.el: Assign a non-nil permanent-local property to
per-buffer variables which lack a default value.

* lisp/help-fns.el (describe-variable): In the "automatically becomes
local" notice, take note of permanent-local variables.

Fixes: debbugs:11930
2012-07-13 22:25:59 +08:00
Chong Yidong
b68b33375c Don't warn on toggle-read-only calls.
Clarify the documentation of toggle-read-only, and audit the code tree
for uses of toggle-read-only; where appropriate, switch to setting the
variable buffer-read-only or calling toggle-read-only with a (new)
second arg.

* lisp/files.el (toggle-read-only): Doc fix and code cleanup.  New arg
to allow printing the message when called from Lisp.

* lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
Remove toggle-read-only.

* lisp/bindings.el (mode-line-toggle-read-only):
* lisp/dired.el (dired-toggle-read-only):
* lisp/ibuffer.el (ibuffer-do-toggle-read-only): Call toggle-read-only
with non-nil second arg.

* lisp/bs.el (bs-toggle-readonly):
* lisp/buff-menu.el (Buffer-menu-toggle-read-only): Remove
with-no-warnings around toggle-read-only.

* lisp/ffap.el (ffap--toggle-read-only): Accept a list of buffers.
Remove with-no-warnings around toggle-read-only.
(ffap-read-only, ffap-read-only-other-window)
(ffap-read-only-other-frame): Callers changed.

* lisp/help-mode.el: Don't require view package.
(help-mode-finish): Set buffer-read-only instead of calling
toggle-read-only.

* lisp/emacs-lisp/eieio-custom.el (eieio-customize-object):
* lisp/vc/ediff.el (ediff-set-read-only-in-buf-A): Set buffer-read-only
directly.

* lisp/gnus/smime.el (smime-certificate-info): Set buffer-read-only directly,
instead of calling toggle-read-only with a (bogus) argument.

* doc/emacs/buffers.texi (Misc Buffer): Document view-read-only.

* doc/lispref/buffers.texi (Read Only Buffers): Document toggle-read-only
changes.  Reword to account for the fact that read-only is currently not
supported in overlay properties.
2012-07-13 15:06:09 +08:00
Stefan Monnier
1ec4b7b259 Get rid of all the manual purecopy calls in menu-bar definitions.
* lisp/loadup.el (purify-flag): Pre-grow the hash-table to reduce the
memory use.
* lisp/bindings.el (bindings--define-key): New function.
* lisp/vc/vc-hooks.el, lisp/replace.el, lisp/menu-bar.el:
* lisp/international/mule-cmds.el, lisp/emacs-lisp/lisp-mode.el:
* lisp/buff-menu.el, lisp/bookmark.el:
* bindings.el: Use it to purecopy define-key bindings.
* src/fns.c (maybe_resize_hash_table): Output message when growing the
purify-hashtable.
2012-06-27 17:15:13 -04:00
Sam Steingold
3d10db47a7 * lisp/bindings.el (global-map): Bind XF86Forward to next-buffer and
XF86Back to previous-buffer.
(minibuffer-local-map): Bind them to next-history-element and
previous-history-element respectively.
* lisp/help-mode.el (help-mode-map): Bind them to help-go-forward and
help-go-back respectively.
* lisp/info.el (Info-mode-map): Bind them to Info-history-forward and
Info-history-back respectively.
These are the keys next to Up on the ThinkPad keyboard.
2012-06-08 00:23:26 -04:00
Chong Yidong
cbe46e5fae Allow clicking mouse-3 on mode line to change coding system.
* lisp/bindings.el (mode-line-coding-system-map): Allow using mouse-3
to invoke set-buffer-file-coding-system.
(mode-line-mule-info-help-echo): Update help text.

Fixes: debbugs:289
2012-06-03 18:54:22 +08:00
Chong Yidong
383f7350f3 Make mode line help-echo visible for unibyte buffers.
* src/xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
buffer.

* lisp/bindings.el (mode-line-mule-info-help-echo)
(mode-line-read-only-help-echo, mode-line-modified-help-echo):
New functions.
(mode-line-mule-info, mode-line-modified): Use them.
(mode-line-eol-desc, propertized-buffer-identification):
Consistency fixes for help text.

Fixes: debbugs:11226
2012-06-03 18:23:49 +08:00
Chong Yidong
5f2c76c6ce Implement default help-echo for mode line.
* lisp/bindings.el: Remove explicit help-echo from format-mode-line.
(mode-line-front-space, mode-line-end-spaces)
(mode-line-misc-info): New variables.
(mode-line-modes, mode-line-position): Move the default value to
the variable definition.
(mode-line-default-help-echo): New defcustom.

* src/buffer.c (buffer_local_value_1): New function, split from
Fbuffer_local_value; can return Qunbound.
(Fbuffer_local_value): Use it.
(Vmode_line_format): Docstring tweaks.

* src/xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
(note_mode_line_or_margin_highlight): If there is no help echo,
use mode-line-default-help-echo.  Handle the case where the mouse
position is past the end of the mode line string.

* doc/lispref/modes.texi (Mode Line Data): Use "mode line construct"
terminology for consistency.
2012-06-03 17:03:23 +08:00
Chong Yidong
3cc99f68ad Some cleanups for the buffer menu and electric buffer menu.
* lisp/buff-menu.el (list-buffers): Move C-x C-b binding from
buff-menu.el to bindings.el.

* lisp/ebuff-menu.el (Electric-buffer-menu-undefined): Use the
:advertised-binding feature.
2012-05-06 16:43:46 +08:00
Stefan Monnier
71873e2b33 Add new error and function `user-error'.
* lisp/subr.el (user-error): New function.
* lisp/window.el (switch-to-buffer):
* lisp/vc/smerge-mode.el (smerge-resolve-function, smerge-resolve)
(smerge-match-conflict):
* lisp/simple.el (previous-matching-history-element)
(next-matching-history-element, goto-history-element, undo-more)
(undo-start):
* lisp/progmodes/etags.el (visit-tags-table-buffer, find-tag-tag)
(find-tag-noselect, find-tag-in-order, etags-goto-tag-location)
(next-file, tags-loop-scan, list-tags, complete-tag):
* lisp/progmodes/compile.el (compilation-loop):
* lisp/mouse.el (mouse-minibuffer-check):
* lisp/man.el (Man-bgproc-sentinel, Man-goto-page):
* lisp/info.el (Info-find-node-2, Info-extract-pointer, Info-history-back)
(Info-history-forward, Info-follow-reference, Info-menu)
(Info-extract-menu-item, Info-extract-menu-counting)
(Info-forward-node, Info-backward-node, Info-next-menu-item)
(Info-last-menu-item, Info-next-preorder, Info-last-preorder)
(Info-next-reference, Info-prev-reference, Info-index)
(Info-index-next, Info-follow-nearest-node)
(Info-copy-current-node-name):
* lisp/imenu.el (imenu--make-index-alist)
(imenu-default-create-index-function, imenu-add-to-menubar):
* lisp/files.el (basic-save-buffer, recover-file):
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* lisp/emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments)
(checkdoc-message-text, checkdoc-defun):
* lisp/dabbrev.el (dabbrev-completion, dabbrev--abbrev-at-point):
* lisp/cus-edit.el (customize-changed-options, customize-rogue)
(customize-saved, custom-variable-set, custom-variable-mark-to-save)
(custom-variable-mark-to-reset-standard)
(custom-variable-reset-backup, custom-face-mark-to-reset-standard)
(custom-file):
* lisp/completion.el (check-completion-length):
* lisp/comint.el (comint-search-arg)
(comint-previous-matching-input-string-position)
(comint-previous-matching-input)
(comint-replace-by-expanded-history-before-point, comint-send-input)
(comint-copy-old-input, comint-backward-matching-input)
(comint-goto-process-mark, comint-set-process-mark):
* lisp/calendar/calendar.el (calendar-cursor-to-date): Use it.
* lisp/bindings.el (debug-ignored-errors): Remove regexps, add `user-error'.
* src/data.c (PUT_ERROR): New macro.
(syms_of_data): Use it.  Add new error type `user-error'.
* src/undo.c (user_error): New function.
(Fprimitive_undo): Use it.
* src/print.c (print_error_message): Adjust print style for `user-error'.
* src/keyboard.c (user_error): New function.
(Fexit_recursive_edit, Fabort_recursive_edit): Use it.
2012-05-04 19:16:47 -04:00
Chong Yidong
5dd1713eeb * bindings.el (goto-map): Bind goto-char to M-g c.
Fixes: debbugs:11240
2012-04-15 17:16:50 +08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Chong Yidong
b2b0776e50 Rework count-words-region. New command count-words.
See discussion at http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg00193.html

* lisp/simple.el (count-words-region): Always count in the region.
Report the number of lines and characters too.
(count-words): New command, which counts in the buffer if the
region is inactive, as count-words-region used to.
(count-words--message): New function.  Handle plurals.
(count-lines-region): Make it an alias for count-words-region.

* lisp/bindings.el (esc-map): Replace count-lines-region with
count-words-region.

* doc/emacs/basic.texi (Position Info): Omit page commands.  Document
count-words-region and count-words.

* doc/emacs/text.texi (Pages): Move what-page documentation here.
2011-10-08 12:37:46 -04:00
Chong Yidong
c383327999 * bindings.el ([M-left],[M-right]): Bind to left-word and right-word respectively. 2011-10-07 12:05:10 -04:00
Glenn Morris
59ee05427d Update some tutorial key bindings; ref bug#8739.
* lisp/tutorial.el (tutorial--default-keys): Update some default bindings.

* etc/NEWS: delete-forward-char is not bound to C-d.

* lisp/bindings.el, lisp/windows.el: Comments.
2011-08-20 15:41:41 -07:00