diff options
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/mac-win.el | 11 | ||||
-rw-r--r-- | lisp/term/x-win.el | 9 | ||||
-rw-r--r-- | lisp/term/xterm.el | 31 |
3 files changed, 41 insertions, 10 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index c66c59a0889..9e3393b04a1 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1539,7 +1539,7 @@ in `selection-converter-alist', which see." (put 'autosave-now 'mac-apple-event-id "asav") ; kAEAutosaveNow ;; kAEInternetEventClass (put 'get-url 'mac-apple-event-id "GURL") ; kAEGetURL -;; Converted HICommand events +;; Converted HI command events (put 'about 'mac-apple-event-id "abou") ; kHICommandAbout (defmacro mac-event-spec (event) @@ -1739,7 +1739,7 @@ Currently the `mailto' scheme is supported." (define-key mac-apple-event-map [internet-event get-url] 'mac-ae-get-url) -(define-key mac-apple-event-map [hicommand about] 'display-splash-screen) +(define-key mac-apple-event-map [hi-command about] 'display-splash-screen) ;;; Converted Carbon Events (defun mac-handle-toolbar-switch-mode (event) @@ -2208,7 +2208,8 @@ See also `mac-dnd-known-types'." ;; If dropping in an ordinary window which we could use, ;; let dnd-open-file-other-window specify what to do. (progn - (goto-char (posn-point (event-start event))) + (when (not mouse-yank-at-point) + (goto-char (posn-point (event-start event)))) (funcall handler window action data)) ;; If we can't display the file here, ;; make a new window for it. @@ -2561,8 +2562,8 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman") ;; Initiate drag and drop -(global-set-key [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) -(global-set-key [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) +(define-key special-event-map [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) +(define-key special-event-map [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) ;;;; Non-toolkit Scroll bars diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 9730aca9b9d..fe774a4125f 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -2386,7 +2386,7 @@ order until succeed.") (defun x-clipboard-yank () "Insert the clipboard contents, or the last stretch of killed text." - (interactive) + (interactive "*") (let ((clipboard-text (x-selection-value 'CLIPBOARD)) (x-select-enable-clipboard t)) (if (and clipboard-text (> (length clipboard-text) 0)) @@ -2518,8 +2518,9 @@ order until succeed.") ;; Override Paste so it looks at CLIPBOARD first. (define-key menu-bar-edit-menu [paste] - (cons "Paste" (cons "Paste text from clipboard or kill ring" - 'x-clipboard-yank))) + '(menu-item "Paste" x-clipboard-yank + :enable (not buffer-read-only) + :help "Paste (yank) text most recently cut/copied")) (setq x-initialized t)) @@ -2531,7 +2532,7 @@ order until succeed.") ;; Initiate drag and drop (add-hook 'after-make-frame-functions 'x-dnd-init-frame) -(global-set-key [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) +(define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) ;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 ;;; x-win.el ends here diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 9c4b8b1190b..2e498a8de86 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -159,8 +159,37 @@ (define-key xterm-function-map "\e[4~" [select]) (define-key xterm-function-map "\e[29~" [print]) -;; These keys are available in xterm starting from version 214 +;; These keys are available in xterm starting from version 216 ;; if the modifyOtherKeys resource is set to 1. + +(define-key xterm-function-map "\e[27;5;39~" [?\C-\']) +(define-key xterm-function-map "\e[27;5;45~" [?\C--]) + +(define-key xterm-function-map "\e[27;5;48~" [?\C-0]) +(define-key xterm-function-map "\e[27;5;49~" [?\C-1]) +;; Not all C-DIGIT keys have a distinct binding. +(define-key xterm-function-map "\e[27;5;57~" [?\C-9]) + +(define-key xterm-function-map "\e[27;5;59~" [?\C-\;]) +(define-key xterm-function-map "\e[27;5;61~" [?\C-=]) + + +(define-key xterm-function-map "\e[27;6;33~" [?\C-!]) +(define-key xterm-function-map "\e[27;6;34~" [?\C-\"]) +(define-key xterm-function-map "\e[27;6;35~" [?\C-#]) +(define-key xterm-function-map "\e[27;6;36~" [?\C-$]) +(define-key xterm-function-map "\e[27;6;37~" [?\C-%]) +(define-key xterm-function-map "\e[27;6;38~" [(C-&)]) +(define-key xterm-function-map "\e[27;6;40~" [?\C-(]) +(define-key xterm-function-map "\e[27;6;41~" [?\C-)]) +(define-key xterm-function-map "\e[27;6;42~" [?\C-*]) +(define-key xterm-function-map "\e[27;6;43~" [?\C-+]) + +(define-key xterm-function-map "\e[27;6;58~" [?\C-:]) +(define-key xterm-function-map "\e[27;6;60~" [?\C-<]) +(define-key xterm-function-map "\e[27;6;62~" [?\C->]) +(define-key xterm-function-map "\e[27;6;63~" [(C-\?)]) + (define-key xterm-function-map "\e[27;5;9~" [C-tab]) (define-key xterm-function-map "\e[27;5;13~" [C-return]) (define-key xterm-function-map "\e[27;5;44~" [?\C-,]) |