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

1303 Commits

Author SHA1 Message Date
Chong Yidong
f9d71b4284 Change clipboard/primary selection to X application standards.
* lisp/menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
Cut/Copy/Paste menu bar items.

* lisp/mouse.el: Bind mouse-2 to mouse-yank-primary.
(mouse-drag-copy-region): Default to nil.

* lisp/simple.el (select-active-regions): Default to t.
(push-mark-command): Don't overwrite primary with empty string.

* lisp/term/x-win.el (x-select-enable-clipboard): Default to t.
(x-initialize-window-system): Don't overwrite Paste menu item.
2010-07-14 14:03:39 -04:00
Adrian Robert
79cb9c05a1 term/ns-win.el: Bind M-~ to 'ns-prev-frame (due to Matthew Dempsky; bug#5084). Remove incorrect binding for S-tab. (ns-alternatives-map): Change S-tab binding to backtab (bug#6616). * simple.el (normal-erase-is-backspace-setup-frame): Set mode on under ns. 2010-07-13 13:41:49 +03:00
Chong Yidong
b922967396 * bindings.el (global-map): Bind delete and DEL, the former to
delete-forward-char.

* mouse.el (mouse-region-delete-keys): Deleted.
(mouse-show-mark): Simplify.

* simple.el (delete-active-region): New option.
(delete-backward-char): Implement in Lisp.
(delete-forward-char): New command.

* src/cmds.c (Fdelete_backward_char): Move into Lisp.
2010-06-27 21:01:11 -04:00
Karl Fogel
7f0b7b3e87 * lisp/simple.el (compose-mail): Fix doc string to refer to
`compose-mail-user-agent-warnings', instead of to the
  nonexistent `compose-mail-check-user-agent'.
2010-06-21 19:26:46 -04:00
Juri Linkov
0665f66133 * lisp/simple.el (kill-new): Fix logic of kill-do-not-save-duplicates.
Instead of setting `replace' to t and replacing the same string
with itself, don't do certain actions when
kill-do-not-save-duplicates is non-nil and string is equal to car
of kill-ring: don't call menu-bar-update-yank-menu, don't push
interprogram-paste strings to kill-ring, and don't push the input
argument `string' to kill-ring.
http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00072.html
2010-06-04 21:38:11 +03:00
Eli Zaretskii
3f2e77354e Fix C-e when bidi reordering is in effect.
simple.el (move-end-of-line): Make sure we are at line beginning
 before backing up to end of previous line.
2010-05-19 20:16:07 +03:00
Stefan Monnier
5ad4bef575 Provide a simple generic indentation engine and use it for Prolog.
* emacs-lisp/smie.el: New file.
* progmodes/prolog.el (prolog-smie-op-levels)
(prolog-smie-indent-rules): New var.
(prolog-mode-variables): Use them to configure SMIE.
(prolog-indent-line, prolog-indent-level): Remove.
2010-05-17 15:27:26 -04:00
Stefan Monnier
10dcc5612a * simple.el (prog-mode): New (abstract) major mode.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it.
* progmodes/sh-script.el (sh-mode): Remove redundant var assignment.
2010-05-14 12:41:01 -04:00
Stefan Monnier
f3ee9200b8 * files.el (auto-save-mode): Move to simple.el to fix bootstrap.
* simple.el (auto-save-mode): Move from files.el.
* minibuffer.el (completion--common-suffix): Fix copy&paste error.
2010-05-07 08:49:14 -04:00
Stefan Monnier
80ac5d4d34 Use define-minor-mode in more cases.
* term/tvi970.el (tvi970-set-keypad-mode):
* simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
(normal-erase-is-backspace-mode):
* scroll-bar.el (scroll-bar-mode): Use it and define-minor-mode.
(set-scroll-bar-mode-1): (Re)move to its sole caller.
(get-scroll-bar-mode): New function.
* emacs-lisp/cl-macs.el (eq): Handle a non-variable first arg.
2010-05-04 23:45:21 -04:00
Stefan Monnier
8f92b8ad07 New hook filter-buffer-substring-functions.
* simple.el (with-wrapper-hook): Move.
(buffer-substring-filters): Mark obsolete.
(filter-buffer-substring-functions): New variable.
(buffer-substring-filters): Use it.  Remove unused arg `noprops'.
2010-05-02 01:56:30 -04:00
Stefan Monnier
56924d996f Make it possible to locally disable a globally enabled mode.
* simple.el (fundamental-mode): Run fundamental-mode-hook.
* emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode
rather than kill-all-local-variables so it runs fundamental-mode-hook.
* emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so
that subsequent hooks get a chance to disable it.
2010-04-28 11:18:37 -04:00
Juri Linkov
74f806a116 Move scrolling commands from simple.el to window.el
because their primitives are implemented in window.c.

* simple.el (scroll-error-top-bottom)
(scroll-up-command, scroll-down-command, scroll-up-line)
(scroll-down-line, scroll-other-window-down)
(beginning-of-buffer-other-window, end-of-buffer-other-window):
* window.el (scroll-error-top-bottom)
(scroll-up-command, scroll-down-command, scroll-up-line)
(scroll-down-line, scroll-other-window-down)
(beginning-of-buffer-other-window, end-of-buffer-other-window):
Move from simple.el to window.el because their primitives are
implemented in window.c.
2010-04-16 04:41:58 +03:00
Juri Linkov
ad40eec53f Check both isearch-scroll' and scroll-command' properties.
* isearch.el (isearch-lookup-scroll-key): Check both
`isearch-scroll' and `scroll-command' properties.
(scroll-up, scroll-down): Remove `isearch-scroll' property.

* mwheel.el (mwheel-scroll): Remove `isearch-scroll' property.

* simple.el (scroll-up-command, scroll-down-command)
(scroll-up-line, scroll-down-line): Remove `isearch-scroll' property.
2010-04-16 04:24:00 +03:00
Juri Linkov
a4b000fb3d Add the `scroll-command' property.
* window.c: Add Qscroll_command.
Remove Vscroll_preserve_screen_position_commands.
(window_scroll_pixel_based, window_scroll_line_based): Check the
`scroll-command' property on the last command instead of searching
the last command in Vscroll_preserve_screen_position_commands.
(syms_of_window): Initialize and staticpro `Qscroll_command'.
Put Qscroll_command property on Qscroll_up and Qscroll_down.
(scroll-preserve-screen-position): Doc fix.
(Vscroll_preserve_screen_position_commands): Remove variable.

* simple.el (scroll-up-command, scroll-down-command)
(scroll-up-line, scroll-down-line): Put `scroll-command'
property on the these symbols.  Remove them from
`scroll-preserve-screen-position-commands'.

* mwheel.el (mwheel-scroll): Put `scroll-command' and
`isearch-scroll' properties on the `mwheel-scroll' symbol.
Remove it from `scroll-preserve-screen-position-commands'.

* isearch.el (isearch-allow-scroll): Doc fix.
2010-04-16 02:51:12 +03:00
Stefan Monnier
38111a5adc (non-essential): New var. 2010-04-14 11:24:17 -04:00
Juri Linkov
7b05466ff6 Add variable scroll-error-top-bottom.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html

* simple.el (scroll-error-top-bottom): New defcustom.
(scroll-up-command, scroll-down-command): Use it.  Doc fix.

* emulation/pc-select.el (pc-select-override-scroll-error):
Obsolete in favor of `scroll-error-top-bottom'.
2010-04-14 03:43:54 +03:00
Juri Linkov
9013a7f82e Add variable `scroll-preserve-screen-position-commands'.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html

* window.c (Vscroll_preserve_screen_position_commands): New variable
with the default value as the list of Qscroll_down and Qscroll_up.
(window_scroll_pixel_based, window_scroll_line_based): Search the
last command in the list Vscroll_preserve_screen_position_commands
instead of comparing with Qscroll_up and Qscroll_down.

* mwheel.el (scroll-preserve-screen-position-commands):
Add mwheel-scroll to this list of commands.

* simple.el (scroll-preserve-screen-position-commands):
Add scroll-up-command, scroll-down-command, scroll-up-line,
scroll-down-line to this list of commands.
2010-04-14 03:11:21 +03:00
Juri Linkov
5a97d2da2c Scrolling commands which scroll a line instead of full screen..
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html

* simple.el (scroll-up-line, scroll-down-line): New commands.
Put property isearch-scroll=t on them.

* emulation/ws-mode.el (scroll-down-line, scroll-up-line):
Remove commands.
2010-04-06 02:44:24 +03:00
Juri Linkov
79ce172a46 Scrolling commands which does not signal errors at top/bottom.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01452.html

* simple.el (scroll-up-command, scroll-down-command): New commands.
Put property isearch-scroll=t on them.

* bindings.el (global-map): Rebind [prior] from `scroll-down' to
`scroll-down-command' and [next] from `scroll-up' to
`scroll-up-command'.

* emulation/cua-base.el: Put property CUA=move on
`scroll-up-command' and `scroll-down-command'.
(cua--init-keymaps): Remap `scroll-up-command' to `cua-scroll-up'
and `scroll-down-command' to `cua-scroll-down'.
2010-04-06 02:38:53 +03:00
Juri Linkov
1cd095c67c * simple.el (next-line, previous-line): Re-throw a signal
with `signal' instead of using `ding'.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01432.html
2010-03-31 18:16:12 +03:00
Juri Linkov
67189e6238 * simple.el (keyboard-escape-quit): Raise deselecting the active
region higher than exiting the minibuffer.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html
2010-03-31 18:02:53 +03:00
Stefan Monnier
85626eefd2 * simple.el (append-to-buffer): Simplify. 2010-03-30 22:53:53 -04:00
Chong Yidong
9d30a9f45e * simple.el (append-to-buffer): Fix last change. 2010-03-25 01:53:30 -04:00
Chong Yidong
d0fba1745f Fix 2009-11-13 change to append-to-buffer (Bug#5749).
* simple.el (append-to-buffer): Ensure that point is preserved if
BUFFER is the current buffer.  Suggested by YAMAMOTO Mitsuharu.
(Bug#5749)
2010-03-24 12:18:13 -04:00
Chong Yidong
e8ab39085d * simple.el (save-interprogram-paste-before-kill): Doc fix. 2010-02-16 09:40:45 -05:00
Juanma Barranquero
fa5f7c5f63 Fix typos in docstrings.
* outline.el (outline-head-from-level):
* simple.el (with-wrapper-hook):
* cedet/ede.el (ede-run-target, project-delete-target)
  (project-dist-files, ede-name, ede-documentation, ede-parent-project)
  (ede-adebug-project, ede-adebug-project-parent)
  (ede-adebug-project-root):
* emacs-lisp/elint.el (elint-extra-errors, elint-current-buffer)
  (elint-defun, elint-buffer-env, elint-top-form-logged)
  (elint-unbound-variable):
* textmodes/reftex-toc.el (reftex-toc-newhead-from-alist):
2010-02-14 18:28:10 +01:00
Glenn Morris
3602064247 Improve docs of some transposition functions.
* simple.el (transpose-subr): Give it a doc-string.

* textmodes/paragraphs.el (transpose-paragraphs, transpose-sentences):
Doc fixes.
2010-02-13 11:29:25 -08:00
Glenn Morris
ea92f9f3e2 * simple.el (visual-line-mode): Capitalize lighter.
See http://lists.gnu.org/archive/html/emacs-devel/2010-02/msg00088.html
2010-02-03 21:02:56 -08:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Chong Yidong
5e1d496851 * simple.el (compose-mail): Remove mail-setup-with-from from
customization checks.
2009-12-12 17:01:03 +00:00
Chong Yidong
3d68fa99af * simple.el (compose-mail): Check for incompatibilities and warn.
(compose-mail-user-agent-warnings): New option.
2009-12-07 16:09:05 +00:00
Chong Yidong
ef187c24a3 * simple.el (beginning-of-visual-line): Constrain to field
boundaries (Bug#5106).
2009-12-06 18:48:48 +00:00
Stefan Monnier
b08016f2fc (normal-erase-is-backspace-mode): Fix thinko in message. 2009-12-01 18:06:06 +00:00
Stefan Monnier
8c22699f8b (with-wrapper-hook): Fix thinko. 2009-11-19 20:58:42 +00:00
Juri Linkov
042b7cc622 (switch-to-completions): Move point to the first
completion when point was at the beginning of the buffer.
2009-11-19 17:40:14 +00:00
Stefan Monnier
a185548b1c * abbrev.el (abbrev-with-wrapper-hook): (re)move...
* simple.el (with-wrapper-hook): ...to here.  Add argument `args'.
* minibuffer.el (completion-in-region-functions): New hook.
(completion-in-region): New function.
* emacs-lisp/lisp.el (lisp-complete-symbol):
* pcomplete.el (pcomplete-std-complete): Use it.
2009-11-19 03:12:51 +00:00
Juri Linkov
0fc1013793 (set-mark-default-inactive): Add :type, :group
and :version.  (Bug#4876)
2009-11-15 15:32:15 +00:00
Chong Yidong
e779144743 * simple.el (shell-command): Doc fix (Bug#4891). 2009-11-14 16:07:44 +00:00
Glenn Morris
f6714ede06 (x-selection-owner-p): Declare.
(read-mail-command): Use custom radio type rather than choice.
(completion-no-auto-exit): Doc fix.
2009-11-14 04:18:10 +00:00
Stefan Monnier
7fdbcd8387 * x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
Stefan Monnier
e96d62cd3a (minibuffer-default-add-completions): Drop deprecated 4th arg. 2009-11-13 14:50:17 +00:00
Dan Nicolaescu
6d341a2a09 * textmodes/ispell.el (ispell-skip-region-alist):
* textmodes/css-mode.el (auto-mode-alist):
* progmodes/compile.el (auto-mode-alist):
* international/mule.el (ctext-non-standard-encodings-alist)
(ctext-non-standard-encodings-regexp):
* simple.el (shell-command-switch, text-read-only):
* replace.el (occur-mode-map):
* paths.el (rmail-file-name):
* jka-cmpr-hook.el (jka-compr-build-file-regexp):
* find-file.el (ff-special-constructs):
* files.el (file-name-handler-alist):
* composite.el: Purecopy strings.
2009-11-12 06:55:39 +00:00
Dan Nicolaescu
6bdad9ae02 * term/x-win.el (x-gtk-stock-map):
* progmodes/vera-mode.el (auto-mode-alist):
* progmodes/inf-lisp.el (inferior-lisp-filter-regexp)
(inferior-lisp-program, inferior-lisp-load-command):
* progmodes/hideshow.el (hs-special-modes-alist):
* progmodes/gud.el (same-window-regexps):
* progmodes/grep.el (grep-program, find-program, xargs-program):
* net/telnet.el (same-window-regexps):
* net/rlogin.el (same-window-regexps):
* language/ethiopic.el (font-ccl-encoder-alist):
* vc-sccs.el (vc-sccs-master-templates):
* vc-rcs.el (vc-rcs-master-templates):
* subr.el (cl-assertion-failed):
* simple.el (next-error-overlay-arrow-position):
* lpr.el (lpr-command):
* locate.el (locate-ls-subdir-switches):
* info.el (same-window-regexps, info)
(Info-goto-emacs-command-node, Info-goto-emacs-key-command-node):
* image-mode.el (image-mode, auto-mode-alist):
* hippie-exp.el (hippie-expand-ignore-buffers):
* format.el (format-alist):
* find-dired.el (find-ls-subdir-switches, find-grep-options)
(find-name-arg):
* facemenu.el (facemenu-keybindings):
* dired.el (dired-listing-switches, dired-chown-program):
* diff.el (diff-switches, diff-command):
* cus-edit.el (same-window-regexps):
* bindings.el (mode-line-mule-info)
(mode-line-buffer-identification): Purecopy strings.
2009-11-11 05:49:09 +00:00
Juri Linkov
e0987650e4 (dired-get-filename)<declare-function>:
Tell the byte-compiler about dired-get-filename.
(shell-command): In Dired mode, get filename from the current line
as the default value.
2009-11-11 00:11:40 +00:00
Dan Nicolaescu
ca0a881a35 * puresize.h (BASE_PURESIZE): Increase to 1470000.
* lread.c (Fload): Purecopy the file name when building Vpreloaded_file_list.

* textmodes/ispell.el (ispell-skip-region-alist):
* international/mule-conf.el (eight-bit):
* international/fontset.el (font-encoding-alist):
* startup.el (pure-space-overflow-message):
* simple.el (overwrite-mode-textual, overwrite-mode-binary):
* paths.el (gnus-nntp-service, rmail-spool-directory)
(term-file-prefix):
* files.el (save-some-buffers-action-alist):
* cmuscheme.el (same-window-buffer-names):
* ielm.el (same-window-buffer-names):
* shell.el (same-window-buffer-names):
* mail/sendmail.el (same-window-buffer-names):
* progmodes/inf-lisp.el (same-window-buffer-names):
* bindings.el (mode-line-client)
(mode-line-column-line-number-mode-map):
* language/tibetan.el (tibetan-precomposition-rule-regexp)
(tibetan-precomposed-regexp): Purecopy string arguments.
2009-10-30 02:00:11 +00:00
Juanma Barranquero
41849bf9cd * simple.el (transpose-subr): Give clearer error when the mark is not set.
(Bug#4807)
2009-10-26 14:59:12 +00:00
Dan Nicolaescu
8f43cbf352 * puresize.h (BASE_PURESIZE): Increase to 1430000.
* term/tty-colors.el (msdos-color-values): Remove declaration, unused.
(color-name-rgb-alist, tty-standard-colors)
(tty-color-mode-alist): Change to defconst.

* simple.el (mark-inactive): Purecopy message.

* menu-bar.el (menu-bar-make-mm-toggle, menu-bar-make-toggle): Fix macro.
(global-map, yank-menu):
* textmodes/ispell.el (ispell-menu-map):
* net/eudc.el (eudc-tools-menu):
* international/mule-cmds.el (describe-language-environment-map)
(setup-language-environment-map, set-coding-system-map)
(mule-menu-keymap):
* vc-hooks.el (vc-menu-entry, vc-menu-map):
* replace.el (occur-mode-map):
* pcvs-defs.el (cvs-global-menu): Purecopy names and tooltips.

* bindings.el (propertized-buffer-identification): Purecopy
tooltip text.
2009-10-23 05:15:26 +00:00
Stefan Monnier
28a90c44b4 * simple.el (normal-erase-is-backspace-mode): Use input-decode-map
rather than fiddling with global-map bindings, since it should only
affect per-terminal settings.
See http://bugs.gentoo.org/show_bug.cgi?id=289709.
2009-10-22 19:31:43 +00:00
Stefan Monnier
ab14d7d521 (switch-to-completions): Look for *Completions* in other frames as well. 2009-10-22 15:27:17 +00:00