2000-10-23 Andrew Choi <akochoi@i-cable.com>
* dispextern.h [macintosh]: Include macgui.h instead of macterm.h.
* dispnew.c [macintosh]: Include macterm.h.
(init_display) [macintosh]: initialization for window system.
* emacs.c (main) [macintosh]: Call syms_of_textprop,
syms_of_macfns, syms_of_ccl, syms_of_fontset, syms_of_xterm,
syms_of_search, x_term_init, and init_keyboard before calling
init_window_once. Also, call syms_of_xmenu.
* fontset.c (syms_of_fontset) [macintosh]: Set ASCII font of
default fontset to Monaco.
* frame.c [macintosh]: Include macterm.h. Remove declarations of
NewMacWindow and DisposeMacWindow.
(make_terminal_frame) [macintosh]: Call make_mac_terminal_frame
instead of calling NewMacWindow and setting fields of
f->output_data.mac directly. Call init_frame_faces.
(Fdelete_frame) [macintosh]: Remove unused code.
(Fmodify_frame_parameters) [macintosh]: Call
x_set_frame_parameters instead of mac_set_frame_parameters.
* frame.h [macintosh]: Define menu_bar_lines field in struct
frame. Define FRAME_EXTERNAL_MENU_BAR macro.
* keyboard.c [macintosh]: Include macterm.h.
(kbd_buffer_get_event) [macintosh]: Generate delete_window_event
and menu_bar_activate_event type events as for X and NT.
(make_lispy_event) [macintosh]: Construct lisp events of type
MENU_BAR_EVENT as for X and NT.
* sysdep.c [macintosh]: Remove declaration for sys_signal.
Include stdlib.h. Remove definition of Vx_bitmap_file_path.
(sys_subshell) [macintosh]: Remove definition entirely.
(init_sys_modes) [macintosh]: Do not initialize Vwindow_system and
Vwindow_system_version here. Remove initialization of
Vx_bitmap_file_path.
(read_input_waiting): Correct the number of parameters passed to
read_socket_hook.
Move all Macintosh functions to mac/mac.c.
* term.c [macintosh]: Include macterm.h.
* window.c [macintosh]: Include macterm.h.
* xdisp.c [macintosh]: Include macterm.h. Declare
set_frame_menubar and pending_menu_activation.
(echo_area_display) [macintosh]: Do not return if terminal frame
is the selected frame.
(update_menu_bar) [macintosh]: Check FRAME_EXTERNAL_MENU_BAR (f).
Allow only the selected frame to set menu bar.
(redisplay_window) [macintosh]: Obtain menu bar to redisplay by
calling FRAME_EXTERNAL_MENU_BAR (f).
(display_menu_bar) [macintosh]: Check FRAME_MAC_P (f).
* xfaces.c [macintosh]: Include macterm.h. Define x_display_info
and check_x. Declare XCreateGC. Define x_create_gc and
x_free_gc. Initialize font_sort_order.
(x_face_list_fonts) [macintosh]: Use the same code as WINDOWSNT,
but call x_list_fonts instead of w32_list_fonts.
(Finternal_face_x_get_resource) [macintosh]: Do not call
display_x_get_resource.
(prepare_face_for_display) [macintosh]: Set xgcv.font.
(realize_x_face) [macintosh]: Load the font if it is specified in
ATTRS.
(syms_of_xfaces) [macintosh]: Initialize Vscalable_fonts_allowed
to Qt.
* cus-edit.el (custom-button-face): Use 3D look for mac.
(custom-button-pressed-face): Likewise.
* faces.el (set-face-attributes-from-resources): Handle mac frames
in the same way as x and w32 frames.
(face-valid-attribute-values): Likewise.
(read-face-attribute): Likewise.
(defined-colors): Likewise.
(color-defined-p): Likewise.
(color-values): Likewise.
(display-grayscale-p): Likewise.
(face-set-after-frame-default): Likewise.
(mode-line): Same default face as for x and w32.
(tool-bar): Likewise.
* frame.el: Remove call to frame-notice-user-settings at end of
the file.
* info.el (Info-fontify-node): make underlines invisible for mac
as for x, pc, and w32 frame types.
* term/mac-win.el: New file.
Add support for @subsubsection titles, which use `Info-title-4-face'.
(Info-title-4-face):
New face.
(Info-title-3-face):
Inherit from Info-title-4-face instead of variable-pitch.
(Info-mode-menu): Bind beginning-of-buffer, Info-edit
(info-tool-bar-map): New variable.
(Info-mode): Use it.
(Info-edit-map): Define all in defvar.
(speedbar-attached-frame): Avoid compiler warning.
Make a few cleanups.
Add extra `help-echo' and `local-map' props to node xrefs.
Use header-specific faces for node-names & xrefs.
(Info-use-header-line, Info-header-line):
New variables.
(info-header, info-header-xref, info-header-node):
New faces.
(Info-setup-header-line):
New function.
(Info-select-node):
Call Info-setup-header-line when enabled.
(Info-extract-pointer):
Work even if the header line is hidden.
technique similar to Info-index, instead of relying on specific
names of relevant Index nodes.
(Info-goto-emacs-command-node): Bind Info-history to nil when
going to the first node found by Info-find-emacs-command-nodes.
non-nil.
(Info-file-list-for-emacs): Remove "info" from the list because
that leads to trying to use the documentation from file `info'
in various situations where it isn't appropriate, for instance
C-h C-k C-h i.
(Info-find-node-in-buffer-1, Info-find-node-in-buffer): New
functions.
(Info-find-node-2): Try a case-sensitive search first, then
do a case-insensitive search.
(Info-complete-menu-item, Info-menu, Info-index, Info-get-token)
(Info-find-emacs-command-nodes): Avoid properties on matched text which
may appear in minibuffer.
(Info-find-node): split into two for Info-on-current-buffer to
hook into it.
(Info-current-file, Info-set-mode-line, Info-up):
Info-current-file can now be t.
(Info-clone-buffer-hook): new function for `clone-buffer'.
(Info-goto-node, Info-menu, Info-mode-map, Info-mode): make
`clone-buffer' available in various ways to the user.
tag table. Don't fail if the node delimiter ^_ is the first
character in the file.
(Info-insert-dir): Don't fail when the node delimiter ^_ is the
first character in the file.
(Info-read-subfile): Likewise.
(Info-select-node): Likewise.
(Info-build-node-completions): Likewise.
in input files, such as "No Top node". Return with point
at the beginning of the text.
(Info-find-node): Reinsert the code to handle files
with no tags table; it was deleted by mistake.
(Info-speedbar-key-map) New key map.
(Info-install-speedbar-variables) New function.
(Info-speedbar-menu-items) Update to new functions.
Install speedbar keymap only when speedbar is loaded.
(Info-speedbar-browser) New command.
(Info-speedbar-hierarchy-buttons, Info-speedbar-goto-node,
Info-speedbar-expand-node, Info-speedbar-fetch-file-nodes) New function
(Info-speedbar-buttons) Handle new node button commands.
(Info-next-preorder): Pass new arg to Info-up.
(Info-last-preorder): Likewise.
(Info-last-preorder): Don't follow the Prev if it's same as the Up.
Instead, follow it as the Up.
Use info-node font for the node's own name,
and do not make it mouse-sensitive.
(Info-find-node): Update Info-history after switching buffer.
(info): If no arg, and *info* buffer exists, just go to it and don't alter it.
Define faces with defface.
(Info-mode): Don't define faces here, and don't alter Info-fontify.
Locally set line-move-ignore-invisible.
(Info-fontify-node): Test type of frame here.
(Info-tag-table-marker): Initialize to nil.
(Info-tag-table-buffer): New variable.
(Info-find-node): Don't switch buffers if already in Info mode.
Use Info-tag-table-buffer to support multiple Info buffers.
(Info-read-subfile): Don't switch to *info* buffer.
(Info-build-node-completions): Handle buffer local bindings for
Info-tag-table-marker.
(Info-search): Add a save-excursion.
(Info-mode): Make Info-tag-table-buffer buffer-local.
Make a different marker in Info-tag-table-marker for each buffer.
(Info-kill-buffer): New function, on kill-buffer-hook.
(Info-check-pointer): New function.
(Info-mode-menu): New menu.
(Info-menu-last-node): New variable.
(Info-menu-update): New function.
(Info-mode): Add `Info-menu-update' to `activate-menubar-hook'.
Match any type of definition, not just Function and Command.
(Info-index-next): Use Info-find-index-name.
(Info-find-node, Info-index, Info-index-next): Use `...' in err msgs.
(info-insert-file-contents): Use info-insert-file-contents-1
to set FULLNAME. Use call-process-region to run the decode program.
(Info-find-node): Use info-insert-file-contents-1.
(info-insert-file-contents-1) [MSDOS]: Don't use the dot in SUFFIX
if FILENAME already has one.