Mercurial > emacs
changeset 32786:3d21222bc794
Andrew Choi <akochoi@i-cable.com>
* international/mule-conf.el (mac-roman-lower, mac-roman-upper):
New charsets.
* term/mac-win.el: Remove definitions of mac-roman-lower and
mac-roman-upper, require dired, and define instead of set
mac-ready-for-drag-n-drop to avoid compilation error.
* src/macterm.c (XTread_socket): check whether Lisp variable
mac-ready-for-drag-n-drop is bound rather than non-nil value.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Mon, 23 Oct 2000 17:49:59 +0000 |
parents | fc837c2f746a |
children | 6660ed022330 |
files | lisp/ChangeLog lisp/international/mule-conf.el lisp/term/mac-win.el mac/ChangeLog mac/src/macterm.c |
diffstat | 5 files changed, 41 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Oct 23 17:47:06 2000 +0000 +++ b/lisp/ChangeLog Mon Oct 23 17:49:59 2000 +0000 @@ -1,3 +1,12 @@ +2000-10-24 Andrew Choi <akochoi@i-cable.com> + + * international/mule-conf.el (mac-roman-lower, mac-roman-upper): + New charsets. + + * term/mac-win.el: Remove definitions of mac-roman-lower and + mac-roman-upper, require dired, and define instead of set + mac-ready-for-drag-n-drop to avoid compilation error. + 2000-10-23 Andrew Innes <andrewi@gnu.org> * files.el (make-backup-file-name-1) [windowsnt, ms-dos]: Remove
--- a/lisp/international/mule-conf.el Mon Oct 23 17:47:06 2000 +0000 +++ b/lisp/international/mule-conf.el Mon Oct 23 17:49:59 2000 +0000 @@ -174,7 +174,16 @@ (define-charset 167 'lao [1 94 1 0 ?1 0 "Lao" "Lao" "Lao characters (ISO10646 0E80..0EDF)"]) -;; CHARSET-IDs 168..223 are not used. +;; Mac Roman. Mac Roman uses all upper 128 characters. Emacs can +;; handle it by using two characters sets: mac-roman-lower for code +;; points 128 to 159 and mac-roman-upper for code points 160 to 255. +(define-charset 168 'mac-roman-lower + [1 96 1 0 ?3 1 "Mac Roman lower" "Mac Roman lower" "Mac Roman lower"]) + +(define-charset 169 'mac-roman-upper + [1 96 1 0 ?4 1 "Mac Roman upper" "Mac Roman upper" "Mac Roman upper"]) + +;; CHARSET-IDs 170..223 are not used. ;; 1-byte 2-column charsets. Valid range of CHARSET-ID is 224..239.
--- a/lisp/term/mac-win.el Mon Oct 23 17:47:06 2000 +0000 +++ b/lisp/term/mac-win.el Mon Oct 23 17:49:59 2000 +0000 @@ -103,6 +103,9 @@ ;; Use Lisp verison of ls instead of calling subprocess on ls (faster, ;; don't need to write ls). (load "ls-lisp") + +(require 'dired) + ;; This variable specifies the Unix program to call (as a process) to ;; deteremine the amount of free space on a file system (defaults to ;; df). If it is not set to nil, ls-lisp will not work correctly @@ -119,11 +122,6 @@ ;; library to use a single frame. (ediff-toggle-multiframe) -;; Emacs must be told we're using an 8-bit code for file names. -;; Otherwise file names won't be displayed properly in dired mode, -;; etc. -(setq file-name-coding-system 'latin-1) - ;; Setup to use the Mac clipboard. The functions mac-cut-function and ;; mac-paste-function are defined in mac.c. (set-selection-coding-system 'compound-text-mac) @@ -158,8 +156,14 @@ (global-set-key [drag-n-drop] 'mac-drag-n-drop) -; Tell event loop in macterm.c we are ready. -(setq mac-ready-for-drag-n-drop t) +;; By checking whether the variable mac-ready-for-drag-n-drop has been +;; defined, the event loop in macterm.c can be informed that it can +;; now receive Finder drag and drop events. Files dropped onto the +;; Emacs application icon can only be processed when the initial frame +;; has been created: this is where the files should be opened. +(add-hook 'after-init-hook + '(lambda () + (defvar mac-ready-for-drag-n-drop t))) ; Define constant values to be set to mac-keyboard-text-encoding (defconst kTextEncodingMacRoman 0) @@ -173,20 +177,6 @@ ;; mac-roman-lower for code points 128 to 159 and mac-roman-upper for ;; code points 160 to 255. -(defvar mac-roman-lower-final-char - (get-unused-iso-final-char 1 96)) - -(defvar mac-roman-upper-final-char - (1+ mac-roman-lower-final-char)) - -(define-charset nil 'mac-roman-lower - (vector 1 96 1 0 mac-roman-lower-final-char 1 - "Mac Roman lower" "Mac Roman lower" "Mac Roman lower")) - -(define-charset nil 'mac-roman-upper - (vector 1 96 1 0 mac-roman-upper-final-char 1 - "Mac Roman upper" "Mac Roman upper" "Mac Roman upper")) - ;; Since Mac Roman does not follow the ISO 2022 standard and uses code ;; points in the range 128-159, it is necessary to define it as a ;; type-4 charset, with CCL programs and all.
--- a/mac/ChangeLog Mon Oct 23 17:47:06 2000 +0000 +++ b/mac/ChangeLog Mon Oct 23 17:49:59 2000 +0000 @@ -1,3 +1,8 @@ +2000-10-24 Andrew Choi <akochoi@i-cable.com> + + * src/macterm.c (XTread_socket): check whether Lisp variable + mac-ready-for-drag-n-drop is bound rather than non-nil value. + 2000-10-20 Andrew Choi <akochoi@users.sourceforge.net> * INSTALL: New file.
--- a/mac/src/macterm.c Mon Oct 23 17:47:06 2000 +0000 +++ b/mac/src/macterm.c Mon Oct 23 17:49:59 2000 +0000 @@ -11123,7 +11123,7 @@ /* Set in term/mac-win.el to indicate that event loop can now generate drag and drop events. */ -Lisp_Object Vmac_ready_for_drag_n_drop; +Lisp_Object Qmac_ready_for_drag_n_drop; Lisp_Object drag_and_drop_file_list; @@ -11769,7 +11769,7 @@ bufp->arg = Qnil; event_mask = everyEvent; - if (NILP (Vmac_ready_for_drag_n_drop)) + if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) event_mask -= highLevelEventMask; if (WaitNextEvent (event_mask, &er, (expected ? app_sleep_time : 0L), NULL)) @@ -12038,7 +12038,7 @@ case kHighLevelEvent: drag_and_drop_file_list = Qnil; - + AEProcessAppleEvent(&er); /* Build a drag_n_drop type event as is done in @@ -12392,6 +12392,9 @@ staticpro (&last_mouse_press_frame); last_mouse_press_frame = Qnil; + Qmac_ready_for_drag_n_drop = intern ("mac-ready-for-drag-n-drop"); + staticpro (&Qmac_ready_for_drag_n_drop); + help_echo = Qnil; staticpro (&help_echo); help_echo_object = Qnil; @@ -12424,11 +12427,6 @@ Otherwise the option key is used."); Vmac_command_key_is_meta = Qt; - DEFVAR_LISP ("mac-ready-for-drag-n-drop", &Vmac_ready_for_drag_n_drop, - "Non-nil indicates that the Mac event loop can now generate drag and\n\ -drop events. Set in term/mac-win.el."); - Vmac_ready_for_drag_n_drop = Qnil; - DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, "One of the Text Encoding Base constant values defined in the\n\ Basic Text Constants section of Inside Macintosh - Text Encoding\n\