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.el55
-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, 59 insertions, 28 deletions
diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el
index 84da8f8b64a..a7897b207d5 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 a242528bd03..11cd8918fc4 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 174a98c224a..aca39ad4dc7 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 b7a4d3a2f98..09e1c77353b 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: utf-8
;; 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
@@ -1737,6 +1737,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")
@@ -1764,6 +1784,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."
@@ -1790,7 +1819,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)
@@ -1803,9 +1832,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)))
@@ -2227,7 +2255,7 @@ either in the current buffer or in the echo area."
("TIFF" . mac-dnd-insert-TIFF))
"Which function to call to handle a drop of that type.
The function takes three arguments, WINDOW, ACTION and DATA.
-WINDOW is where the drop occured, ACTION is always `private' on
+WINDOW is where the drop occurred, ACTION is always `private' on
Mac. DATA is the drop data. Unlike the x-dnd counterpart, the
return value of the function is not significant.
@@ -2262,10 +2290,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)
@@ -2286,12 +2314,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
@@ -2454,7 +2486,6 @@ It returns a name of the created fontset."
;; 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 7967f7f9176..61cb6d29ebf 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 e99fc941b0c..91e91c662e7 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 0d264f247ec..9ca2197fca1 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 f0b7ca65456..0a0827596a0 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 dfbeb4a0333..38ef5f8678f 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 ba093bc603f..203a41b1d9c 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 6f4656bcaad..1540173fc83 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 6dcaaac0958..fd95be90bfd 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 88b3a9124fb..1b912c3860e 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