summaryrefslogtreecommitdiff
path: root/lisp/term
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/AT386.el2
-rw-r--r--lisp/term/internal.el2
-rw-r--r--lisp/term/iris-ansi.el2
-rw-r--r--lisp/term/mac-win.el53
-rw-r--r--lisp/term/news.el2
-rw-r--r--lisp/term/pc-win.el2
-rw-r--r--lisp/term/rxvt.el2
-rw-r--r--lisp/term/sun-mouse.el2
-rw-r--r--lisp/term/sun.el2
-rw-r--r--lisp/term/sup-mouse.el2
-rw-r--r--lisp/term/tty-colors.el2
-rw-r--r--lisp/term/tvi970.el2
-rw-r--r--lisp/term/vt100.el2
-rw-r--r--lisp/term/w32-win.el2
-rw-r--r--lisp/term/wyse50.el2
-rw-r--r--lisp/term/x-win.el2
-rw-r--r--lisp/term/xterm.el2
17 files changed, 58 insertions, 27 deletions
diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el
index 702a4b614e2..67808089e11 100644
--- a/lisp/term/AT386.el
+++ b/lisp/term/AT386.el
@@ -1,7 +1,7 @@
;;; AT386.el --- terminal support package for IBM AT keyboards -*- no-byte-compile: t -*-
;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Keywords: terminals
diff --git a/lisp/term/internal.el b/lisp/term/internal.el
index 0cbb3ae10f6..e9afd6b9462 100644
--- a/lisp/term/internal.el
+++ b/lisp/term/internal.el
@@ -1,7 +1,7 @@
;;; internal.el --- support for PC internal terminal -*- coding: raw-text; no-byte-compile: t -*-
;; Copyright (C) 1993, 1994, 1998, 1999, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Morten Welinder <terra@diku.dk>
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el
index 56a387b1848..e45cf1384c9 100644
--- a/lisp/term/iris-ansi.el
+++ b/lisp/term/iris-ansi.el
@@ -1,7 +1,7 @@
;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*-
;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Dan Nicolaescu <dann@ics.uci.edu>
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 700ad57029b..7e3d7b14ddd 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1,7 +1,7 @@
;;; mac-win.el --- parse switches controlling interface with Mac window system -*-coding: iso-2022-7bit;-*-
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Andrew Choi <akochoi@mac.com>
;; Keywords: terminals
@@ -1687,6 +1687,26 @@ in `selection-converter-alist', which see."
(+ (* i 10) 12)))))
result))
+(defconst mac-keyboard-modifier-mask-alist
+ (mapcar
+ (lambda (modifier-bit)
+ (cons (car modifier-bit) (lsh 1 (cdr modifier-bit))))
+ '((command . 8) ; cmdKeyBit
+ (shift . 9) ; shiftKeyBit
+ (option . 11) ; optionKeyBit
+ (control . 12) ; controlKeyBit
+ (function . 17))) ; kEventKeyModifierFnBit
+ "Alist of Mac keyboard modifier symbols vs masks.")
+
+(defun mac-ae-keyboard-modifiers (ae)
+ (let ((modifiers-value (mac-ae-number ae "kmod"))
+ modifiers)
+ (if modifiers-value
+ (dolist (modifier-mask mac-keyboard-modifier-mask-alist)
+ (if (/= (logand modifiers-value (cdr modifier-mask)) 0)
+ (setq modifiers (cons (car modifier-mask) modifiers)))))
+ modifiers))
+
(defun mac-ae-open-documents (event)
"Open the documents specified by the Apple event EVENT."
(interactive "e")
@@ -1714,6 +1734,15 @@ in `selection-converter-alist', which see."
nil t)))))
(select-frame-set-input-focus (selected-frame)))
+(defun mac-ae-quit-application (event)
+ "Quit the application Emacs with the Apple event EVENT."
+ (interactive "e")
+ (let ((ae (mac-event-ae event)))
+ (unwind-protect
+ (save-buffers-kill-emacs)
+ ;; Reaches here if the user has canceled the quit.
+ (mac-resume-apple-event ae -128)))) ; userCanceledErr
+
(defun mac-ae-get-url (event)
"Open the URL specified by the Apple event EVENT.
Currently the `mailto' scheme is supported."
@@ -1740,7 +1769,7 @@ Currently the `mailto' scheme is supported."
'mac-ae-open-documents)
(define-key mac-apple-event-map [core-event show-preferences] 'customize)
(define-key mac-apple-event-map [core-event quit-application]
- 'save-buffers-kill-emacs)
+ 'mac-ae-quit-application)
(define-key mac-apple-event-map [internet-event get-url] 'mac-ae-get-url)
@@ -1753,9 +1782,8 @@ With no keyboard modifiers, it toggles the visibility of the
frame where the tool-bar toggle button was pressed. With some
modifiers, it changes global tool-bar visibility setting."
(interactive "e")
- (let* ((ae (mac-event-ae event))
- (modifiers (cdr (mac-ae-parameter ae "kmod"))))
- (if (and modifiers (not (string= modifiers "\000\000\000\000")))
+ (let ((ae (mac-event-ae event)))
+ (if (mac-ae-keyboard-modifiers ae)
;; Globally toggle tool-bar-mode if some modifier key is pressed.
(tool-bar-mode)
(let ((frame (mac-ae-frame ae)))
@@ -2212,10 +2240,10 @@ See also `mac-dnd-known-types'."
(defun mac-dnd-insert-TIFF (window action data)
(dnd-insert-text window action (mac-TIFF-to-string data)))
-(defun mac-dnd-drop-data (event frame window data type)
+(defun mac-dnd-drop-data (event frame window data type &optional action)
+ (or action (setq action 'private))
(let* ((type-info (assoc type mac-dnd-types-alist))
(handler (cdr type-info))
- (action 'private)
(w (posn-window (event-start event))))
(when handler
(if (and (windowp w) (window-live-p w)
@@ -2236,12 +2264,16 @@ See also `mac-dnd-known-types'."
(defun mac-dnd-handle-drag-n-drop-event (event)
"Receive drag and drop events."
(interactive "e")
- (let ((window (posn-window (event-start event))))
+ (let ((window (posn-window (event-start event)))
+ (ae (mac-event-ae event))
+ action)
(when (windowp window) (select-window window))
- (dolist (item (mac-ae-list (mac-event-ae event)))
+ (if (memq 'option (mac-ae-keyboard-modifiers ae))
+ (setq action 'copy))
+ (dolist (item (mac-ae-list ae))
(if (not (equal (car item) "null"))
(mac-dnd-drop-data event (selected-frame) window
- (cdr item) (car item)))))
+ (cdr item) (car item) action))))
(select-frame-set-input-focus (selected-frame)))
;;; Do the actual Windows setup here; the above code just defines
@@ -2582,7 +2614,6 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
;; Initiate drag and drop
(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/news.el b/lisp/term/news.el
index d39c79838f6..e88af7882a7 100644
--- a/lisp/term/news.el
+++ b/lisp/term/news.el
@@ -1,7 +1,7 @@
;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard -*- no-byte-compile: t -*-
;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index fd63e5a1db9..7a737715cd8 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -1,7 +1,7 @@
;;; pc-win.el --- setup support for `PC windows' (whatever that is)
;; Copyright (C) 1994, 1996, 1997, 1999, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Morten Welinder <terra@diku.dk>
;; Maintainer: FSF
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index cd8160c507c..d9c87bba7fe 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -1,6 +1,6 @@
;;; rxvt.el --- define function key sequences and standard colors for rxvt
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Eli Zaretskii
;; Keywords: terminals
diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el
index 76b2ef6d3d9..dcc56d503e9 100644
--- a/lisp/term/sun-mouse.el
+++ b/lisp/term/sun-mouse.el
@@ -1,7 +1,7 @@
;;; sun-mouse.el --- mouse handling for Sun windows
;; Copyright (C) 1987, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Jeff Peck
;; Maintainer: FSF
diff --git a/lisp/term/sun.el b/lisp/term/sun.el
index 8913fa98268..b17b9125d8e 100644
--- a/lisp/term/sun.el
+++ b/lisp/term/sun.el
@@ -1,7 +1,7 @@
;;; sun.el --- keybinding for standard default sunterm keys
;; Copyright (C) 1987, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Jeff Peck <peck@sun.com>
;; Keywords: terminals
diff --git a/lisp/term/sup-mouse.el b/lisp/term/sup-mouse.el
index a038fbd3d9d..52528cb8aa9 100644
--- a/lisp/term/sup-mouse.el
+++ b/lisp/term/sup-mouse.el
@@ -1,7 +1,7 @@
;;; sup-mouse.el --- supdup mouse support for lisp machines
;; Copyright (C) 1985, 1986, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Wolfgang Rupprecht
;; Maintainer: FSF
diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el
index c03aebf4068..6dcd63eb945 100644
--- a/lisp/term/tty-colors.el
+++ b/lisp/term/tty-colors.el
@@ -1,7 +1,7 @@
;;; tty-colors.el --- color support for character terminals
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Eli Zaretskii
;; Maintainer: FSF
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el
index 083c99f6241..cb309740155 100644
--- a/lisp/term/tvi970.el
+++ b/lisp/term/tvi970.el
@@ -1,7 +1,7 @@
;;; tvi970.el --- terminal support for the Televideo 970
;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>, January 1992
;; Keywords: terminals
diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el
index 38509a471cd..0c4fcc70768 100644
--- a/lisp/term/vt100.el
+++ b/lisp/term/vt100.el
@@ -1,7 +1,7 @@
;;; vt100.el --- define VT100 function key sequences in function-key-map
;; Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 5ba5b270327..56dbf944dfe 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -1,7 +1,7 @@
;;; w32-win.el --- parse switches controlling interface with W32 window system
;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Kevin Gallo
;; Keywords: terminals
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el
index 6723ee8a07c..79d73504a08 100644
--- a/lisp/term/wyse50.el
+++ b/lisp/term/wyse50.el
@@ -1,7 +1,7 @@
;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*-
;; Copyright (C) 1989, 1993, 1994, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>,
;; Jim Blandy <jimb@occs.cs.oberlin.edu>
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 32959f38e34..d2978147ad1 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1,7 +1,7 @@
;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit;-*-
;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;; 2005, 2006 Free Software Foundation, Inc.
+;; 2005, 2006, 2007 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals, i18n
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index f72c4d205d1..9ac820dda72 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -1,7 +1,7 @@
;;; xterm.el --- define function key sequences and standard colors for xterm
;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals