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.
This commit is contained in:
Andrew Choi 2000-10-23 17:49:59 +00:00
parent fa2c768f76
commit 8f47302e25
5 changed files with 41 additions and 30 deletions

View file

@ -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

View file

@ -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.

View file

@ -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 @@ Switch to a buffer editing the last file dropped."
(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 @@ Switch to a buffer editing the last file dropped."
;; 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.

View file

@ -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.

View file

@ -11123,7 +11123,7 @@ int current_mac_keyboard_text_encoding = kTextEncodingMacRoman;
/* 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 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
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 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
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 @@ syms_of_macterm ()
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 @@ wide as that tab on the display.");
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\