summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit10
-rw-r--r--src/ChangeLog175
-rw-r--r--src/buffer.c30
-rw-r--r--src/buffer.h5
-rw-r--r--src/ccl.c9
-rw-r--r--src/composite.c12
-rw-r--r--src/eval.c37
-rw-r--r--src/fileio.c31
-rw-r--r--src/frame.h8
-rw-r--r--src/keymap.c2
-rw-r--r--src/lread.c16
-rw-r--r--src/mac.c8
-rw-r--r--src/macfns.c7
-rw-r--r--src/macgui.h25
-rw-r--r--src/macselect.c4
-rw-r--r--src/macterm.c304
-rw-r--r--src/macterm.h7
-rw-r--r--src/minibuf.c6
-rw-r--r--src/search.c1
-rw-r--r--src/syntax.c8
-rw-r--r--src/textprop.c4
-rw-r--r--src/w32.c39
-rw-r--r--src/w32fns.c4
-rw-r--r--src/w32proc.c5
-rw-r--r--src/window.c48
-rw-r--r--src/xdisp.c41
-rw-r--r--src/xfaces.c4
27 files changed, 532 insertions, 318 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 68042505ed5..95ea18f7136 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -129,20 +129,24 @@ define pitx
end
if ($it->what == IT_CHARACTER)
if ($it->len == 1 && $it->c >= ' ' && it->c < 255)
- printf "ch='%c'", $it->c
+ printf " ch='%c'", $it->c
else
- printf "ch=[%d,%d]", $it->c, $it->len
+ printf " ch=[%d,%d]", $it->c, $it->len
end
else
if ($it->what == IT_IMAGE)
- printf "IMAGE=%d", $it->image_id
+ printf " IMAGE=%d", $it->image_id
else
+ printf " "
output $it->what
end
end
if ($it->method != GET_FROM_BUFFER)
printf " next="
output $it->method
+ if ($it->method == GET_FROM_STRING)
+ printf "[%d]", $it->current.string_pos.charpos
+ end
end
printf "\n"
if ($it->region_beg_charpos >= 0)
diff --git a/src/ChangeLog b/src/ChangeLog
index f3f865612f6..5f04eec4768 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,164 @@
+2005-07-21 Juanma Barranquero <lekktu@gmail.com>
+
+ * buffer.c (syms_of_buffer) <cursor-type>: Doc fix.
+
+ * ccl.c (Fregister_ccl_program): Fix typos in docstring.
+ (Fccl_execute_on_string): Likewise; add usage info.
+
+ * composite.c (Fcompose_region_internal)
+ (Fcompose_string_internal):
+ Improve argument/docstring consistency.
+
+ * minibuf.c (Fminibuffer_prompt_end, Feval_minibuffer):
+ Fix typos in docstrings.
+
+ * textprop.c (Fnext_char_property_change)
+ (Fprevious_char_property_change): Doc fixes.
+
+ * window.c (Fset_window_margins, Fset_window_fringes):
+ Improve argument/docstring consistency.
+
+ * xfaces.c (Finternal_lisp_face_p): Doc fix.
+
+2005-07-21 Andreas Schwab <schwab@suse.de>
+
+ * eval.c (restore_stack_limits): Return a value.
+
+2005-07-20 Juanma Barranquero <lekktu@gmail.com>
+
+ * eval.c (Fdefvar): Doc fix.
+
+2005-07-20 Kim F. Storm <storm@cua.dk>
+
+ * fileio.c (Fdo_auto_save, do_auto_save_unwind):
+ Use make_save_value to unwind protect stream.
+
+ * lread.c (Fload, load_unwind):
+ Use make_save_value to unwind protect stream.
+
+2005-07-19 Juanma Barranquero <lekktu@gmail.com>
+
+ * eval.c (Fprog2, Fcalled_interactively_p),
+ (syms_of_eval) <debug-on-quit>: Doc fixes.
+ (syms_of_eval) <max-specpdl-size>:
+ (Finteractive_p): Fix typos in docstrings.
+
+2005-07-19 Kim F. Storm <storm@cua.dk>
+
+ * w32fns.c (Vx_hand_shape): Variable removed.
+ (syms_of_w32fns): Intern and staticpro Qw32_charset_default.
+
+2005-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * buffer.h (Fgenerate_new_buffer_name): Declare (for use in coding.c).
+
+2005-07-18 Kim F. Storm <storm@cua.dk>
+
+ * frame.h (struct frame): New member already_hscrolled_p.
+
+ * xdisp.c (redisplay_internal): Only try to hscroll each frame once
+ to avoid redisplay looping hscrolling back and forth ad infinitum.
+
+2005-07-18 Juri Linkov <juri@jurta.org>
+
+ * buffer.c (scroll-up-aggressively, scroll-down-aggressively):
+ * keymap.c (Fminor_mode_key_binding):
+ * macterm.c (mac-emulate-three-button-mouse):
+ Delete duplicate duplicate words.
+
+2005-07-18 Ken Raeburn <raeburn@gnu.org>
+
+ * minibuf.c (Ftest_completion): Fix odd syntax in test.
+
+2005-07-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macfns.c (x_set_cursor_color): Use XSetBackground and XSetForeground.
+
+ * macgui.h (struct _XGC): New struct.
+ (GC): Use it.
+ (GCForeground, GCBackground, GCFont): Use X11 mask values.
+ (XCreateGC, XParseGeometry): Move externs to macterm.h.
+
+ * macterm.c (x_bitmap_icon, x_make_frame_visible): Remove declarations.
+ (XSetFont): Add declaration.
+ (mac_set_forecolor, mac_set_backcolor, mac_set_colors):
+ Remove functions.
+ (GC_FORE_COLOR, GC_BACK_COLOR, GC_FONT, MAC_WINDOW_NORMAL_GC):
+ New defines.
+ (XDrawLine, mac_draw_line_to_pixmap, XClearWindow)
+ (mac_draw_bitmap, XCreatePixmapFromBitmapData, XFillRectangle)
+ (mac_draw_rectangle, mac_draw_string_common, mac_scroll_area):
+ Use them.
+ (mac_erase_rectangle): New function.
+ (XClearArea, x_draw_fringe_bitmap, x_clear_glyph_string_rect)
+ (x_draw_stretch_glyph_string): Use it.
+ (XChangeGC, XCreateGC, XGetGCValues, XSetForeground)
+ (XSetBackground, XSetFont): Adjust for new GC implementation.
+ (x_draw_fringe_bitmap, x_draw_box_rect): Use GC to set colors.
+ (XTset_vertical_scroll_bar): Clear area under scroll bar.
+
+ * macterm.h (struct mac_display_info): Change types of
+ scratch_cursor_gc black_relief.gc, and white_relief.gc to GC.
+ (XCreateGC, XParseGeometry): Move externs from macgui.h.
+
+ * xfaces.c [MAC_OS] (XCreateGC): Remove extern.
+
+2005-07-16 Richard M. Stallman <rms@gnu.org>
+
+ * buffer.c (Fmake_overlay): Doc fix.
+
+2005-07-16 Eli Zaretskii <eliz@gnu.org>
+
+ * w32proc.c (syms_of_ntproc): staticpro Qhigh, Qlow,
+ Vw32_valid_locale_ids, and Vw32_valid_codepages.
+
+2005-07-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * mac.c [TARGET_API_MAC_CARBON] (Fmac_code_convert_string):
+ Use Fstring_as_unibyte instead of string_make_unibyte.
+
+2005-07-15 Richard M. Stallman <rms@gnu.org>
+
+ * xdisp.c (select_frame_for_redisplay): Use find_symbol_value.
+
+2005-07-15 Kim F. Storm <storm@cua.dk>
+
+ * xdisp.c: Fix redisplay loop in last change.
+ (IT_POS_VALID_AFTER_MOVE_P): New macro.
+ (move_it_vertically_backward, move_it_by_lines): Use it.
+
+2005-07-14 Jason Rumney <jasonr@gnu.org>
+
+ * w32.c (init_environment): Default HOME directory to user's
+ appdata directory if possible.
+
+2005-07-14 Kim F. Storm <storm@cua.dk>
+
+ * .gdbinit (pitx): Fix output format. Print string charpos.
+
+ * lread.c (syms_of_lread): Initialize seen_list.
+
+ * search.c (syms_of_search): Staticpro searchbuf.whitespace_regexp.
+
+ * syntax.c (syms_of_syntax): Staticpro lisp objects in gl_state.
+ Staticpro re_match_object.
+
+2005-07-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macselect.c (get_scrap_target_type_list): Avoid NULL pointer
+ dereference.
+
+ * macterm.c (mac_window_to_frame): Remove duplicate define.
+
+2005-07-14 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (code_convert_region_unwind): ARG is changed to a cons.
+ (code_convert_region): Adjust for the above change.
+ (set_conversion_work_buffer): If the work buffer is already in
+ use, generate a new buffer and return it. Otherwise return Qnil.
+ (run_pre_post_conversion_on_str): Adjust for the above change.
+ (run_pre_write_conversin_on_c_str): Likewise.
+
2005-07-13 Kim F. Storm <storm@cua.dk>
* xdisp.c (start_display): Don't reseat to next visible line start
@@ -9,7 +170,7 @@
count rows moved over when moving to start of current row in case
row starts in middle of a string or image. Also move further
backward if we end up in a string or image.
- (try_cursor_movement): if overlay string spans multiple lines,
+ (try_cursor_movement): If overlay string spans multiple lines,
move backward to set cursor on start of an overlay string.
(cursor_row_p): Row is ok if cursor is at newline from string, but
string starts on this line (so we always position cursor at start
@@ -38,22 +199,22 @@
(disable_mouse_highlight): Remove unused variable.
[USE_TOOLKIT_SCROLL_BARS] (construct_scroll_bar_click)
(x_scroll_bar_handle_press, x_scroll_bar_handle_release)
- (x_scroll_bar_handle_drag): Remove argument `timestamp'. All
- callers changed.
+ (x_scroll_bar_handle_drag): Remove argument `timestamp'.
+ All callers changed.
[USE_TOOLKIT_SCROLL_BARS] (construct_scroll_bar_click): Don't set
timestamp.
[USE_CARBON_EVENTS] (mac_handle_mouse_event): Likewise.
(x_scroll_bar_create, XTset_vertical_scroll_bar): Show scroll bar
only when its width is less than the height.
(XTredeem_scroll_bar): Sync with xterm.c.
- (font_name_table, font_name_table_size, font_name_count): Make
- static.
+ (font_name_table, font_name_table_size, font_name_count):
+ Make static.
(drag_and_drop_file_list): Remove variable. Previous use is now
local to function.
(do_ae_open_documents): Move DRAG_N_DROP event construction part
from XTread_socket.
- (XTread_socket): Consolidate setting of event timestamp. Move
- DRAG_N_DROP event construction part to do_ae_open_documents.
+ (XTread_socket): Consolidate setting of event timestamp.
+ Move DRAG_N_DROP event construction part to do_ae_open_documents.
Support extra_keyboard_modifiers.
* xfaces.c (try_font_list) [MAC_OS]: Try font family name
diff --git a/src/buffer.c b/src/buffer.c
index 4001801922f..01be485fcc0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3573,10 +3573,12 @@ DEFUN ("make-overlay", Fmake_overlay, Smake_overlay, 2, 5, 0,
doc: /* Create a new overlay with range BEG to END in BUFFER.
If omitted, BUFFER defaults to the current buffer.
BEG and END may be integers or markers.
-The fourth arg FRONT-ADVANCE, if non-nil, makes the
-front delimiter advance when text is inserted there.
-The fifth arg REAR-ADVANCE, if non-nil, makes the
-rear delimiter advance when text is inserted there. */)
+The fourth arg FRONT-ADVANCE, if non-nil, makes the marker
+for the front of the overlay advance when text is inserted there
+(which means the text *is not* included in the overlay).
+The fifth arg REAR-ADVANCE, if non-nil, makes the marker
+for the rear of the overlay advance when text is inserted there
+(which means the text *is* included in the overlay). */)
(beg, end, buffer, front_advance, rear_advance)
Lisp_Object beg, end, buffer;
Lisp_Object front_advance, rear_advance;
@@ -5743,7 +5745,7 @@ that fraction of the window's height from the bottom of the window.
When the value is 0.0, point goes at the bottom line, which in the simple
case that you moved off with C-f means scrolling just one line. 1.0 means
point goes at the top, so that in that simple case, the window
-window scrolls by a full window height. Meaningful values are
+scrolls by a full window height. Meaningful values are
between 0.0 and 1.0, inclusive. */);
DEFVAR_PER_BUFFER ("scroll-down-aggressively",
@@ -5756,7 +5758,7 @@ that fraction of the window's height from the top of the window.
When the value is 0.0, point goes at the top line, which in the simple
case that you moved off with C-b means scrolling just one line. 1.0 means
point goes at the bottom, so that in that simple case, the window
-window scrolls by a full window height. Meaningful values are
+scrolls by a full window height. Meaningful values are
between 0.0 and 1.0, inclusive. */);
/*DEFVAR_LISP ("debug-check-symbol", &Vcheck_symbol,
@@ -5944,15 +5946,15 @@ is a member of the list. */);
doc: /* Cursor to use when this buffer is in the selected window.
Values are interpreted as follows:
- t use the cursor specified for the frame
- nil don't display a cursor
- box display a filled box cursor
- hollow display a hollow box cursor
- bar display a vertical bar cursor with default width
- (bar . WIDTH) display a vertical bar cursor with width WIDTH
- hbar display a horizontal bar cursor with default height
+ t use the cursor specified for the frame
+ nil don't display a cursor
+ box display a filled box cursor
+ hollow display a hollow box cursor
+ bar display a vertical bar cursor with default width
+ (bar . WIDTH) display a vertical bar cursor with width WIDTH
+ hbar display a horizontal bar cursor with default height
(hbar . HEIGHT) display a horizontal bar cursor with height HEIGHT
- ANYTHING ELSE display a hollow box cursor.
+ ANYTHING ELSE display a hollow box cursor
When the buffer is displayed in a nonselected window,
this variable has no effect; the cursor appears as a hollow box. */);
diff --git a/src/buffer.h b/src/buffer.h
index d97640d6cea..12475ce26a8 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1,6 +1,6 @@
/* Header file for the buffer manipulation primitives.
- Copyright (C) 1985,86,93,94,95,97,98,99,2000,01,03,04
- Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
+ 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -860,6 +860,7 @@ EXFUN (Fget_file_buffer, 1);
EXFUN (Fnext_overlay_change, 1);
EXFUN (Fdelete_overlay, 1);
EXFUN (Fbuffer_local_value, 2);
+EXFUN (Fgenerate_new_buffer_name, 2);
/* Functions to call before and after each text change. */
extern Lisp_Object Vbefore_change_functions;
diff --git a/src/ccl.c b/src/ccl.c
index 6359e947d27..e827ed7f28d 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2030,7 +2030,7 @@ DEFUN ("ccl-execute-on-string", Fccl_execute_on_string, Sccl_execute_on_string,
3, 5, 0,
doc: /* Execute CCL-PROGRAM with initial STATUS on STRING.
-CCL-PROGRAM is a symbol registered by register-ccl-program,
+CCL-PROGRAM is a symbol registered by `register-ccl-program',
or a compiled code generated by `ccl-compile' (for backward compatibility,
in this case, the execution is slower).
@@ -2051,7 +2051,8 @@ It returns the contents of write buffer as a string,
If the optional 5th arg UNIBYTE-P is non-nil, the returned string
is a unibyte string. By default it is a multibyte string.
-See the documentation of `define-ccl-program' for the detail of CCL program. */)
+See the documentation of `define-ccl-program' for the detail of CCL program.
+usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBYTE-P) */)
(ccl_prog, status, str, contin, unibyte_p)
Lisp_Object ccl_prog, status, str, contin, unibyte_p;
{
@@ -2177,8 +2178,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program. */
DEFUN ("register-ccl-program", Fregister_ccl_program, Sregister_ccl_program,
2, 2, 0,
- doc: /* Register CCL program CCL_PROG as NAME in `ccl-program-table'.
-CCL_PROG should be a compiled CCL program (vector), or nil.
+ doc: /* Register CCL program CCL-PROG as NAME in `ccl-program-table'.
+CCL-PROG should be a compiled CCL program (vector), or nil.
If it is nil, just reserve NAME as a CCL program name.
Return index number of the registered CCL program. */)
(name, ccl_prog)
diff --git a/src/composite.c b/src/composite.c
index 63d54b93a34..1eb0b0212fd 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -628,8 +628,8 @@ DEFUN ("compose-region-internal", Fcompose_region_internal,
Compose text in the region between START and END.
Optional 3rd and 4th arguments are COMPONENTS and MODIFICATION-FUNC
for the composition. See `compose-region' for more detail. */)
- (start, end, components, mod_func)
- Lisp_Object start, end, components, mod_func;
+ (start, end, components, modification_func)
+ Lisp_Object start, end, components, modification_func;
{
validate_region (&start, &end);
if (!NILP (components)
@@ -638,7 +638,7 @@ for the composition. See `compose-region' for more detail. */)
&& !STRINGP (components))
CHECK_VECTOR (components);
- compose_text (XINT (start), XINT (end), components, mod_func, Qnil);
+ compose_text (XINT (start), XINT (end), components, modification_func, Qnil);
return Qnil;
}
@@ -649,8 +649,8 @@ DEFUN ("compose-string-internal", Fcompose_string_internal,
Compose text between indices START and END of STRING.
Optional 4th and 5th arguments are COMPONENTS and MODIFICATION-FUNC
for the composition. See `compose-string' for more detail. */)
- (string, start, end, components, mod_func)
- Lisp_Object string, start, end, components, mod_func;
+ (string, start, end, components, modification_func)
+ Lisp_Object string, start, end, components, modification_func;
{
CHECK_STRING (string);
CHECK_NUMBER (start);
@@ -661,7 +661,7 @@ for the composition. See `compose-string' for more detail. */)
|| XINT (end) > SCHARS (string))
args_out_of_range (start, end);
- compose_text (XINT (start), XINT (end), components, mod_func, string);
+ compose_text (XINT (start), XINT (end), components, modification_func, string);
return string;
}
diff --git a/src/eval.c b/src/eval.c
index 3b4e9fe0324..26d1ce967a7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -235,6 +235,7 @@ restore_stack_limits (data)
{
max_specpdl_size = XINT (XCAR (data));
max_lisp_eval_depth = XINT (XCDR (data));
+ return Qnil;
}
/* Call the Lisp debugger, giving it argument ARG. */
@@ -471,10 +472,10 @@ usage: (prog1 FIRST BODY...) */)
}
DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVALLED, 0,
- doc: /* Eval X, Y and BODY sequentially; value from Y.
-The value of Y is saved during the evaluation of the remaining args,
-whose values are discarded.
-usage: (prog2 X Y BODY...) */)
+ doc: /* Eval FORM1, FORM2 and BODY sequentially; value from FORM2.
+The value of FORM2 is saved during the evaluation of the
+remaining args, whose values are discarded.
+usage: (prog2 FORM1 FORM2 BODY...) */)
(args)
Lisp_Object args;
{
@@ -564,8 +565,8 @@ usage: (function ARG) */)
DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0,
doc: /* Return t if the function was run directly by user input.
-This means that the function was called with call-interactively (which
-includes being called as the binding of a key)
+This means that the function was called with `call-interactively'
+\(which includes being called as the binding of a key)
and input is currently coming from the keyboard (not in keyboard macro),
and Emacs is not running in batch mode (`noninteractive' is nil).
@@ -586,14 +587,14 @@ unconditionally for that argument. (`p' is a good way to do this.) */)
DEFUN ("called-interactively-p", Fcalled_interactively_p, Scalled_interactively_p, 0, 0, 0,
- doc: /* Return t if the function using this was called with call-interactively.
+ doc: /* Return t if the function using this was called with `call-interactively'.
This is used for implementing advice and other function-modifying
features of Emacs.
The cleanest way to test whether your function was called with
-`call-interactively', the way to do that is by adding an extra
-optional argument, and making the `interactive' spec specify non-nil
-unconditionally for that argument. (`p' is a good way to do this.) */)
+`call-interactively' is by adding an extra optional argument,
+and making the `interactive' spec specify non-nil unconditionally
+for that argument. (`p' is a good way to do this.) */)
()
{
return interactive_p (1) ? Qt : Qnil;
@@ -779,7 +780,7 @@ The return value is BASE-VARIABLE. */)
DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0,
- doc: /* Define SYMBOL as a variable.
+ doc: /* Define SYMBOL as a variable, and return SYMBOL.
You are not required to define a variable in order to use it,
but the definition can supply documentation and an initial value
in a way that tags can recognize.
@@ -2859,8 +2860,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
val = (*XSUBR (fun)->function) (internal_args[0]);
goto done;
case 2:
- val = (*XSUBR (fun)->function) (internal_args[0],
- internal_args[1]);
+ val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1]);
goto done;
case 3:
val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
@@ -2868,8 +2868,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
goto done;
case 4:
val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
- internal_args[2],
- internal_args[3]);
+ internal_args[2], internal_args[3]);
goto done;
case 5:
val = (*XSUBR (fun)->function) (internal_args[0], internal_args[1],
@@ -3395,7 +3394,7 @@ void
syms_of_eval ()
{
DEFVAR_INT ("max-specpdl-size", &max_specpdl_size,
- doc: /* *Limit on number of Lisp variable bindings & unwind-protects.
+ doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's.
If Lisp code tries to increase the total number past this amount,
an error is signaled.
You can safely use a value considerably larger than the default value,
@@ -3492,10 +3491,8 @@ It does not apply to errors handled by `condition-case'. */);
Vdebug_ignored_errors = Qnil;
DEFVAR_BOOL ("debug-on-quit", &debug_on_quit,
- doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example).
-Does not apply if quit is handled by a `condition-case'.
-When you evaluate an expression interactively, this variable
-is temporarily non-nil if `eval-expression-debug-on-quit' is non-nil. */);
+ doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example).
+Does not apply if quit is handled by a `condition-case'. */);
debug_on_quit = 0;
DEFVAR_BOOL ("debug-on-next-call", &debug_on_next_call,
diff --git a/src/fileio.c b/src/fileio.c
index be6bf37ad94..7d84e243207 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5734,13 +5734,13 @@ auto_save_1 ()
}
static Lisp_Object
-do_auto_save_unwind (stream) /* used as unwind-protect function */
- Lisp_Object stream;
+do_auto_save_unwind (arg) /* used as unwind-protect function */
+ Lisp_Object arg;
{
+ FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
auto_saving = 0;
- if (!NILP (stream))
- fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16
- | XFASTINT (XCDR (stream))));
+ if (stream != NULL)
+ fclose (stream);
return Qnil;
}
@@ -5785,8 +5785,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
int auto_saved = 0;
int do_handled_files;
Lisp_Object oquit;
- FILE *stream;
- Lisp_Object lispstream;
+ FILE *stream = NULL;
int count = SPECPDL_INDEX ();
int orig_minibuffer_auto_raise = minibuffer_auto_raise;
int old_message_p = 0;
@@ -5838,24 +5837,10 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
}
stream = fopen (SDATA (listfile), "w");
- if (stream != NULL)
- {
- /* Arrange to close that file whether or not we get an error.
- Also reset auto_saving to 0. */
- lispstream = Fcons (Qnil, Qnil);
- XSETCARFASTINT (lispstream, (EMACS_UINT)stream >> 16);
- XSETCDRFASTINT (lispstream, (EMACS_UINT)stream & 0xffff);
- }
- else
- lispstream = Qnil;
- }
- else
- {
- stream = NULL;
- lispstream = Qnil;
}
- record_unwind_protect (do_auto_save_unwind, lispstream);
+ record_unwind_protect (do_auto_save_unwind,
+ make_save_value (stream, 0));
record_unwind_protect (do_auto_save_unwind_1,
make_number (minibuffer_auto_raise));
minibuffer_auto_raise = 0;
diff --git a/src/frame.h b/src/frame.h
index 8e4c77f9af4..290aed3266e 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -463,6 +463,10 @@ struct frame
realized. Reset to zero whenever the default face changes.
Used to see the difference between a font change and face change. */
unsigned default_face_done_p : 1;
+
+ /* Set to non-zero if this frame has already been hscrolled during
+ current redisplay. */
+ unsigned already_hscrolled_p : 1;
};
#ifdef MULTI_KBOARD
@@ -821,13 +825,13 @@ extern Lisp_Object selected_frame;
Display-related Macros
***********************************************************************/
-/* Canonical y-unit on frame F.
+/* Canonical y-unit on frame F.
This value currently equals the line height of the frame (which is
the height of the default font of F). */
#define FRAME_LINE_HEIGHT(F) ((F)->line_height)
-/* Canonical x-unit on frame F.
+/* Canonical x-unit on frame F.
This value currently equals the average width of the default font of F. */
#define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
diff --git a/src/keymap.c b/src/keymap.c
index 090996c7e0d..dd206b8f065 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1694,7 +1694,7 @@ bindings; see the description of `lookup-key' for more details about this. */)
DEFUN ("minor-mode-key-binding", Fminor_mode_key_binding, Sminor_mode_key_binding, 1, 2, 0,
doc: /* Find the visible minor mode bindings of KEY.
-Return an alist of pairs (MODENAME . BINDING), where MODENAME is the
+Return an alist of pairs (MODENAME . BINDING), where MODENAME is
the symbol which names the minor mode binding KEY, and BINDING is
KEY's definition in that mode. In particular, if KEY has no
minor-mode bindings, return nil. If the first binding is a
diff --git a/src/lread.c b/src/lread.c
index 52a68923682..0cac2515b4f 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -853,7 +853,6 @@ Return t if file exists. */)
{
register FILE *stream;
register int fd = -1;
- register Lisp_Object lispstream;
int count = SPECPDL_INDEX ();
Lisp_Object temp;
struct gcpro gcpro1;
@@ -1088,10 +1087,7 @@ Return t if file exists. */)
}
GCPRO1 (file);
- lispstream = Fcons (Qnil, Qnil);
- XSETCARFASTINT (lispstream, (EMACS_UINT)stream >> 16);
- XSETCDRFASTINT (lispstream, (EMACS_UINT)stream & 0xffff);
- record_unwind_protect (load_unwind, lispstream);
+ record_unwind_protect (load_unwind, make_save_value (stream, 0));
record_unwind_protect (load_descriptor_unwind, load_descriptor_list);
specbind (Qload_file_name, found);
specbind (Qinhibit_file_name_operation, Qnil);
@@ -1150,11 +1146,12 @@ Return t if file exists. */)
}
static Lisp_Object
-load_unwind (stream) /* used as unwind-protect function in load */
- Lisp_Object stream;
+load_unwind (arg) /* used as unwind-protect function in load */
+ Lisp_Object arg;
{
- fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16
- | XFASTINT (XCDR (stream))));
+ FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer;
+ if (stream != NULL)
+ fclose (stream);
if (--load_in_progress < 0) load_in_progress = 0;
return Qnil;
}
@@ -4161,6 +4158,7 @@ to load. See also `load-dangerous-libraries'. */);
staticpro (&read_objects);
read_objects = Qnil;
staticpro (&seen_list);
+ seen_list = Qnil;
Vloads_in_progress = Qnil;
staticpro (&Vloads_in_progress);
diff --git a/src/mac.c b/src/mac.c
index 203b47a1975..11dd93aa88d 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -1,5 +1,5 @@
/* Unix emulation routines for GNU Emacs on the Mac OS.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -4144,7 +4144,11 @@ nil. */)
src_encoding = get_cfstring_encoding_from_lisp (source);
tgt_encoding = get_cfstring_encoding_from_lisp (target);
- string = string_make_unibyte (string);
+ /* We really want string_to_unibyte, but since it doesn't exist yet, we
+ use string_as_unibyte which works as well, except for the fact that
+ it's too permissive (it doesn't check that the multibyte string only
+ contain single-byte chars). */
+ string = Fstring_as_unibyte (string);
if (src_encoding != kCFStringEncodingInvalidId
&& tgt_encoding != kCFStringEncodingInvalidId)
str = CFStringCreateWithBytes (NULL, SDATA (string), SBYTES (string),
diff --git a/src/macfns.c b/src/macfns.c
index 603f0ec5313..a37ddde3458 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1570,9 +1570,10 @@ x_set_cursor_color (f, arg, oldval)
{
BLOCK_INPUT;
/* Update frame's cursor_gc. */
- f->output_data.mac->cursor_gc->foreground = fore_pixel;
- f->output_data.mac->cursor_gc->background = pixel;
-
+ XSetBackground (FRAME_MAC_DISPLAY (f),
+ f->output_data.mac->cursor_gc, pixel);
+ XSetForeground (FRAME_MAC_DISPLAY (f),
+ f->output_data.mac->cursor_gc, fore_pixel);
UNBLOCK_INPUT;
if (FRAME_VISIBLE_P (f))
diff --git a/src/macgui.h b/src/macgui.h
index d9948278d1b..ca55bad7a8c 100644
--- a/src/macgui.h
+++ b/src/macgui.h
@@ -180,15 +180,24 @@ typedef struct _XGCValues
XFontStruct *font;
} XGCValues;
-typedef XGCValues *GC;
+typedef struct _XGC
+{
+ /* Original value. */
+ XGCValues xgcv;
+
+ /* Cached data members follow. */
-extern XGCValues *
-XCreateGC (void *, Window, unsigned long, XGCValues *);
+ /* QuickDraw foreground color. */
+ RGBColor fore_color;
-#define GCForeground 0x01
-#define GCBackground 0x02
-#define GCFont 0x03
-#define GCGraphicsExposures 0
+ /* QuickDraw background color. */
+ RGBColor back_color;
+} *GC;
+
+#define GCForeground (1L<<2)
+#define GCBackground (1L<<3)
+#define GCFont (1L<<14)
+#define GCGraphicsExposures 0
/* Bit Gravity */
@@ -248,8 +257,6 @@ typedef struct {
#define PBaseSize (1L << 8) /* program specified base for incrementing */
#define PWinGravity (1L << 9) /* program specified window gravity */
-extern int XParseGeometry ();
-
typedef struct {
int x, y;
unsigned width, height;
diff --git a/src/macselect.c b/src/macselect.c
index b519950eb75..94fe591a206 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -371,7 +371,7 @@ get_scrap_target_type_list (scrap)
err = GetScrapFlavorCount (scrap, &count);
if (err == noErr)
flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count);
- if (err == noErr && flavor_info)
+ if (flavor_info)
{
err = GetScrapFlavorInfoList (scrap, &count, flavor_info);
if (err != noErr)
@@ -380,6 +380,8 @@ get_scrap_target_type_list (scrap)
flavor_info = NULL;
}
}
+ if (flavor_info == NULL)
+ count = 0;
#endif
for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest))
{
diff --git a/src/macterm.c b/src/macterm.c
index 9420f236e59..5b7d3ee2262 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -96,8 +96,6 @@ Boston, MA 02110-1301, USA. */
(NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey) \
: controlKey)
#define macAltKey (NILP (Vmac_command_key_is_meta) ? cmdKey : optionKey)
-
-#define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP)
/* Non-nil means Emacs uses toolkit scroll bars. */
@@ -263,14 +261,19 @@ static void x_scroll_bar_report_motion P_ ((struct frame **, Lisp_Object *,
Lisp_Object *, Lisp_Object *,
unsigned long *));
-static int is_emacs_window (WindowPtr);
+static int is_emacs_window P_ ((WindowPtr));
-int x_bitmap_icon (struct frame *, Lisp_Object);
-void x_make_frame_visible (struct frame *);
+static void XSetFont P_ ((Display *, GC, XFontStruct *));
/* Defined in macmenu.h. */
extern void menubar_selection_callback (FRAME_PTR, int);
+#define GC_FORE_COLOR(gc) (&(gc)->fore_color)
+#define GC_BACK_COLOR(gc) (&(gc)->back_color)
+#define GC_FONT(gc) ((gc)->xgcv.font)
+#define MAC_WINDOW_NORMAL_GC(w) (((mac_output *) GetWRefCon (w))->normal_gc)
+
+
/* X display function emulation */
void
@@ -282,51 +285,6 @@ XFreePixmap (display, pixmap)
}
-/* Set foreground color for subsequent QuickDraw commands. Assume
- graphic port has already been set. */
-
-static void
-mac_set_forecolor (unsigned long color)
-{
- RGBColor fg_color;
-
- fg_color.red = RED16_FROM_ULONG (color);
- fg_color.green = GREEN16_FROM_ULONG (color);
- fg_color.blue = BLUE16_FROM_ULONG (color);
-
- RGBForeColor (&fg_color);
-}
-
-
-/* Set background color for subsequent QuickDraw commands. Assume
- graphic port has already been set. */
-
-static void
-mac_set_backcolor (unsigned long color)
-{
- RGBColor bg_color;
-
- bg_color.red = RED16_FROM_ULONG (color);
- bg_color.green = GREEN16_FROM_ULONG (color);
- bg_color.blue = BLUE16_FROM_ULONG (color);
-
- RGBBackColor (&bg_color);
-}
-
-/* Set foreground and background color for subsequent QuickDraw
- commands. Assume that the graphic port has already been set. */
-
-static void
-mac_set_colors (gc, bg_save)
- GC gc;
- RGBColor *bg_save;
-{
- if (bg_save)
- GetBackColor (bg_save);
- mac_set_forecolor (gc->foreground);
- mac_set_backcolor (gc->background);
-}
-
/* Mac version of XDrawLine. */
static void
@@ -336,16 +294,12 @@ XDrawLine (display, w, gc, x1, y1, x2, y2)
GC gc;
int x1, y1, x2, y2;
{
- RGBColor old_bg;
-
SetPortWindowPort (w);
- mac_set_colors (gc, &old_bg);
+ RGBForeColor (GC_FORE_COLOR (gc));
MoveTo (x1, y1);
LineTo (x2, y2);
-
- RGBBackColor (&old_bg);
}
void
@@ -361,7 +315,7 @@ mac_draw_line_to_pixmap (display, p, gc, x1, y1, x2, y2)
GetGWorld (&old_port, &old_gdh);
SetGWorld (p, NULL);
- mac_set_colors (gc, NULL);
+ RGBForeColor (GC_FORE_COLOR (gc));
LockPixels (GetGWorldPixMap (p));
MoveTo (x1, y1);
@@ -371,32 +325,38 @@ mac_draw_line_to_pixmap (display, p, gc, x1, y1, x2, y2)
SetGWorld (old_port, old_gdh);
}
-/* Mac version of XClearArea. */
-void
-XClearArea (display, w, x, y, width, height, exposures)
- Display *display;
+static void
+mac_erase_rectangle (w, gc, x, y, width, height)
WindowPtr w;
+ GC gc;
int x, y;
unsigned int width, height;
- int exposures;
{
- struct mac_output *mwp = (mac_output *) GetWRefCon (w);
Rect r;
- XGCValues xgc;
- RGBColor old_bg;
-
- xgc.foreground = mwp->x_compatible.foreground_pixel;
- xgc.background = mwp->x_compatible.background_pixel;
SetPortWindowPort (w);
- mac_set_colors (&xgc, &old_bg);
+ RGBBackColor (GC_BACK_COLOR (gc));
SetRect (&r, x, y, x + width, y + height);
EraseRect (&r);
- RGBBackColor (&old_bg);
+ RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
+}
+
+
+/* Mac version of XClearArea. */
+
+void
+XClearArea (display, w, x, y, width, height, exposures)
+ Display *display;
+ WindowPtr w;
+ int x, y;
+ unsigned int width, height;
+ int exposures;
+{
+ mac_erase_rectangle (w, MAC_WINDOW_NORMAL_GC (w), x, y, width, height);
}
/* Mac version of XClearWindow. */
@@ -406,15 +366,9 @@ XClearWindow (display, w)
Display *display;
WindowPtr w;
{
- struct mac_output *mwp = (mac_output *) GetWRefCon (w);
- XGCValues xgc;
-
- xgc.foreground = mwp->x_compatible.foreground_pixel;
- xgc.background = mwp->x_compatible.background_pixel;
-
SetPortWindowPort (w);
- mac_set_colors (&xgc, NULL);
+ RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
#if TARGET_API_MAC_CARBON
{
@@ -442,7 +396,6 @@ mac_draw_bitmap (display, w, gc, x, y, width, height, bits, overlay_p)
{
BitMap bitmap;
Rect r;
- RGBColor old_bg;
bitmap.rowBytes = sizeof(unsigned short);
bitmap.baseAddr = (char *)bits;
@@ -450,7 +403,8 @@ mac_draw_bitmap (display, w, gc, x, y, width, height, bits, overlay_p)
SetPortWindowPort (w);
- mac_set_colors (gc, &old_bg);
+ RGBForeColor (GC_FORE_COLOR (gc));
+ RGBBackColor (GC_BACK_COLOR (gc));
SetRect (&r, x, y, x + width, y + height);
#if TARGET_API_MAC_CARBON
@@ -463,7 +417,7 @@ mac_draw_bitmap (display, w, gc, x, y, width, height, bits, overlay_p)
overlay_p ? srcOr : srcCopy, 0);
#endif /* not TARGET_API_MAC_CARBON */
- RGBBackColor (&old_bg);
+ RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
}
@@ -569,12 +523,16 @@ XCreatePixmapFromBitmapData (display, w, data, width, height, fg, bg, depth)
char *data;
unsigned int width, height;
unsigned long fg, bg;
- unsigned int depth; /* not used */
+ unsigned int depth;
{
Pixmap pixmap;
BitMap bitmap;
CGrafPtr old_port;
GDHandle old_gdh;
+ static GC gc = NULL; /* not reentrant */
+
+ if (gc == NULL)
+ gc = XCreateGC (display, w, 0, NULL);
pixmap = XCreatePixmap (display, w, width, height, depth);
if (pixmap == NULL)
@@ -583,8 +541,10 @@ XCreatePixmapFromBitmapData (display, w, data, width, height, fg, bg, depth)
GetGWorld (&old_port, &old_gdh);
SetGWorld (pixmap, NULL);
mac_create_bitmap_from_bitmap_data (&bitmap, data, width, height);
- mac_set_forecolor (fg);
- mac_set_backcolor (bg);
+ XSetForeground (display, gc, fg);
+ XSetBackground (display, gc, bg);
+ RGBForeColor (GC_FORE_COLOR (gc));
+ RGBBackColor (GC_BACK_COLOR (gc));
LockPixels (GetGWorldPixMap (pixmap));
#if TARGET_API_MAC_CARBON
CopyBits (&bitmap, GetPortBitMapForCopyBits (pixmap),
@@ -612,16 +572,13 @@ XFillRectangle (display, w, gc, x, y, width, height)
unsigned int width, height;
{
Rect r;
- RGBColor old_bg;
SetPortWindowPort (w);
- mac_set_colors (gc, &old_bg);
+ RGBForeColor (GC_FORE_COLOR (gc));
SetRect (&r, x, y, x + width, y + height);
PaintRect (&r); /* using foreground color of gc */
-
- RGBBackColor (&old_bg);
}
@@ -640,7 +597,7 @@ mac_fill_rectangle_to_pixmap (display, p, gc, x, y, width, height)
GetGWorld (&old_port, &old_gdh);
SetGWorld (p, NULL);
- mac_set_colors (gc, NULL);
+ RGBForeColor (GC_FORE_COLOR (gc));
SetRect (&r, x, y, x + width, y + height);
LockPixels (GetGWorldPixMap (p));
@@ -663,16 +620,13 @@ mac_draw_rectangle (display, w, gc, x, y, width, height)
unsigned int width, height;
{
Rect r;
- RGBColor old_bg;
SetPortWindowPort (w);
- mac_set_colors (gc, &old_bg);
+ RGBForeColor (GC_FORE_COLOR (gc));
SetRect (&r, x, y, x + width + 1, y + height + 1);
FrameRect (&r); /* using foreground color of gc */
-
- RGBBackColor (&old_bg);
}
@@ -693,7 +647,7 @@ mac_draw_rectangle_to_pixmap (display, p, gc, x, y, width, height)
GetGWorld (&old_port, &old_gdh);
SetGWorld (p, NULL);
- mac_set_colors (gc, NULL);
+ RGBForeColor (GC_FORE_COLOR (gc));
SetRect (&r, x, y, x + width + 1, y + height + 1);
LockPixels (GetGWorldPixMap (p));
@@ -715,9 +669,6 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode,
char *buf;
int nchars, mode, bytes_per_char;
{
- RGBColor old_bg;
-
- SetPortWindowPort (w);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
UInt32 textFlags, savedFlags;
if (!NILP(Vmac_use_core_graphics)) {
@@ -726,17 +677,22 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode,
}
#endif
- mac_set_colors (gc, &old_bg);
+ SetPortWindowPort (w);
+
+ RGBForeColor (GC_FORE_COLOR (gc));
+ if (mode != srcOr)
+ RGBBackColor (GC_BACK_COLOR (gc));
- TextFont (gc->font->mac_fontnum);
- TextSize (gc->font->mac_fontsize);
- TextFace (gc->font->mac_fontface);
+ TextFont (GC_FONT (gc)->mac_fontnum);
+ TextSize (GC_FONT (gc)->mac_fontsize);
+ TextFace (GC_FONT (gc)->mac_fontface);
TextMode (mode);
MoveTo (x, y);
DrawText (buf, 0, nchars * bytes_per_char);
- RGBBackColor (&old_bg);
+ if (mode != srcOr)
+ RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
if (!NILP(Vmac_use_core_graphics))
SwapQDTextFlags(savedFlags);
@@ -915,7 +871,7 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y)
BackColor (whiteColor);
CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0);
- mac_set_colors (gc, NULL);
+ RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
#endif /* not TARGET_API_MAC_CARBON */
}
@@ -1005,28 +961,37 @@ mac_copy_area_with_mask_to_pixmap (display, src, mask, dest, gc, src_x, src_y,
/* Mac replacement for XChangeGC. */
static void
-XChangeGC (void * ignore, XGCValues* gc, unsigned long mask,
- XGCValues *xgcv)
+XChangeGC (display, gc, mask, xgcv)
+ Display *display;
+ GC gc;
+ unsigned long mask;
+ XGCValues *xgcv;
{
if (mask & GCForeground)
- gc->foreground = xgcv->foreground;
+ XSetForeground (display, gc, xgcv->foreground);
if (mask & GCBackground)
- gc->background = xgcv->background;
+ XSetBackground (display, gc, xgcv->background);
if (mask & GCFont)
- gc->font = xgcv->font;
+ XSetFont (display, gc, xgcv->font);
}
/* Mac replacement for XCreateGC. */
-XGCValues *
-XCreateGC (void * ignore, Window window, unsigned long mask,
- XGCValues *xgcv)
+GC
+XCreateGC (display, window, mask, xgcv)
+ Display *display;
+ Window window;
+ unsigned long mask;
+ XGCValues *xgcv;
{
- XGCValues *gc = (XGCValues *) xmalloc (sizeof (XGCValues));
- bzero (gc, sizeof (XGCValues));
+ GC gc = xmalloc (sizeof (*gc));
- XChangeGC (ignore, gc, mask, xgcv);
+ if (gc)
+ {
+ bzero (gc, sizeof (*gc));
+ XChangeGC (display, gc, mask, xgcv);
+ }
return gc;
}
@@ -1046,10 +1011,18 @@ XFreeGC (display, gc)
/* Mac replacement for XGetGCValues. */
static void
-XGetGCValues (void* ignore, XGCValues *gc,
- unsigned long mask, XGCValues *xgcv)
+XGetGCValues (display, gc, mask, xgcv)
+ Display *display;
+ GC gc;
+ unsigned long mask;
+ XGCValues *xgcv;
{
- XChangeGC (ignore, xgcv, mask, gc);
+ if (mask & GCForeground)
+ xgcv->foreground = gc->xgcv.foreground;
+ if (mask & GCBackground)
+ xgcv->background = gc->xgcv.background;
+ if (mask & GCFont)
+ xgcv->font = gc->xgcv.font;
}
@@ -1061,7 +1034,13 @@ XSetForeground (display, gc, color)
GC gc;
unsigned long color;
{
- gc->foreground = color;
+ if (gc->xgcv.foreground != color)
+ {
+ gc->xgcv.foreground = color;
+ gc->fore_color.red = RED16_FROM_ULONG (color);
+ gc->fore_color.green = GREEN16_FROM_ULONG (color);
+ gc->fore_color.blue = BLUE16_FROM_ULONG (color);
+ }
}
@@ -1073,7 +1052,25 @@ XSetBackground (display, gc, color)
GC gc;
unsigned long color;
{
- gc->background = color;
+ if (gc->xgcv.background != color)
+ {
+ gc->xgcv.background = color;
+ gc->back_color.red = RED16_FROM_ULONG (color);
+ gc->back_color.green = GREEN16_FROM_ULONG (color);
+ gc->back_color.blue = BLUE16_FROM_ULONG (color);
+ }
+}
+
+
+/* Mac replacement for XSetFont. */
+
+static void
+XSetFont (display, gc, font)
+ Display *display;
+ GC gc;
+ XFontStruct *font;
+{
+ gc->xgcv.font = font;
}
@@ -1120,19 +1117,6 @@ XSetWindowBackground (display, w, color)
#endif
}
-
-/* Mac replacement for XSetFont. */
-
-static void
-XSetFont (display, gc, font)
- Display *display;
- GC gc;
- XFontStruct *font;
-{
- gc->font = font;
-}
-
-
/* x_sync is a no-op on Mac. */
void
x_sync (f)
@@ -1443,7 +1427,6 @@ x_draw_fringe_bitmap (w, row, p)
struct frame *f = XFRAME (WINDOW_FRAME (w));
Display *display = FRAME_MAC_DISPLAY (f);
WindowPtr window = FRAME_MAC_WINDOW (f);
- XGCValues gcv;
GC gc = f->output_data.mac->normal_gc;
struct face *face = p->face;
int rowY;
@@ -1467,9 +1450,6 @@ x_draw_fringe_bitmap (w, row, p)
if (p->bx >= 0 && !p->overlay_p)
{
- XGCValues gcv;
- gcv.foreground = face->background;
-
#if 0 /* MAC_TODO: stipple */
/* In case the same realized face is used for fringes and
for something displayed in the text (e.g. face `region' on
@@ -1481,9 +1461,7 @@ x_draw_fringe_bitmap (w, row, p)
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->background);
#endif
- XFillRectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
- &gcv,
- p->bx, p->by, p->nx, p->ny);
+ mac_erase_rectangle (window, face->gc, p->bx, p->by, p->nx, p->ny);
#if 0 /* MAC_TODO: stipple */
if (!face->stipple)
@@ -1494,15 +1472,17 @@ x_draw_fringe_bitmap (w, row, p)
if (p->which)
{
unsigned short *bits = p->bits + p->dh;
+ XGCValues gcv;
- gcv.foreground = (p->cursor_p
- ? (p->overlay_p ? face->background
- : f->output_data.mac->cursor_pixel)
- : face->foreground);
- gcv.background = face->background;
-
- mac_draw_bitmap (display, window, &gcv, p->x, p->y,
+ XGetGCValues (display, face->gc, GCForeground, &gcv);
+ XSetForeground (display, face->gc,
+ (p->cursor_p
+ ? (p->overlay_p ? face->background
+ : f->output_data.mac->cursor_pixel)
+ : face->foreground));
+ mac_draw_bitmap (display, window, face->gc, p->x, p->y,
p->wd, p->h, bits, p->overlay_p);
+ XSetForeground (display, face->gc, gcv.foreground);
}
mac_reset_clipping (display, window);
@@ -1980,10 +1960,7 @@ x_clear_glyph_string_rect (s, x, y, w, h)
struct glyph_string *s;
int x, y, w, h;
{
- XGCValues xgcv;
-
- xgcv.foreground = s->gc->background;
- XFillRectangle (s->display, s->window, &xgcv, x, y, w, h);
+ mac_erase_rectangle (s->window, s->gc, x, y, w, h);
}
@@ -2571,27 +2548,29 @@ x_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width,
{
XGCValues xgcv;
- xgcv.foreground = s->face->box_color;
+ XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
+ XSetForeground (s->display, s->gc, s->face->box_color);
mac_set_clip_rectangle (s->display, s->window, clip_rect);
/* Top. */
- XFillRectangle (s->display, s->window, &xgcv,
+ XFillRectangle (s->display, s->window, s->gc,
left_x, top_y, right_x - left_x + 1, width);
/* Left. */
if (left_p)
- XFillRectangle (s->display, s->window, &xgcv,
+ XFillRectangle (s->display, s->window, s->gc,
left_x, top_y, width, bottom_y - top_y + 1);
/* Bottom. */
- XFillRectangle (s->display, s->window, &xgcv,
+ XFillRectangle (s->display, s->window, s->gc,
left_x, bottom_y - width + 1, right_x - left_x + 1, width);
/* Right. */
if (right_p)
- XFillRectangle (s->display, s->window, &xgcv,
+ XFillRectangle (s->display, s->window, s->gc,
right_x - width + 1, top_y, width, bottom_y - top_y + 1);
+ XSetForeground (s->display, s->gc, xgcv.foreground);
mac_reset_clipping (s->display, s->window);
}
@@ -3010,13 +2989,7 @@ x_draw_stretch_glyph_string (s)
}
else
#endif /* MAC_TODO */
- {
- XGCValues xgcv;
- XGetGCValues (s->display, gc, GCForeground | GCBackground, &xgcv);
- XSetForeground (s->display, gc, xgcv.background);
- XFillRectangle (s->display, s->window, gc, x, y, w, h);
- XSetForeground (s->display, gc, xgcv.foreground);
- }
+ mac_erase_rectangle (s->window, gc, x, y, w, h);
mac_reset_clipping (s->display, s->window);
}
@@ -4567,13 +4540,10 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
&& XINT (bar->width) == sb_width
&& XINT (bar->height) == height))
{
- /* Clear areas not covered by the scroll bar because it's not as
- wide as the area reserved for it . This makes sure a
- previous mode line display is cleared after C-x 2 C-x 1, for
- example. */
- int area_width = WINDOW_SCROLL_BAR_AREA_WIDTH (w);
+ /* Since toolkit scroll bars are smaller than the space reserved
+ for them on the frame, we have to clear "under" them. */
XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
- left, top, area_width, height, 0);
+ left, top, width, height, 0);
#if 0
if (sb_left + sb_width >= FRAME_PIXEL_WIDTH (f))
@@ -10151,7 +10121,7 @@ useful for non-standard keyboard layouts. */);
doc: /* t means that when the option-key is held down while pressing the
mouse button, the click will register as mouse-2 and while the
command-key is held down, the click will register as mouse-3.
-'reverse means that the the option-key will register for mouse-3
+'reverse means that the option-key will register for mouse-3
and the command-key will register for mouse-2. nil means that
no emulation should be done and the modifiers should be placed
on the mouse-1 event. */);
diff --git a/src/macterm.h b/src/macterm.h
index f0846b10fa4..71cd4db82c0 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -149,7 +149,7 @@ struct mac_display_info
int smallest_font_height;
/* Reusable Graphics Context for drawing a cursor in a non-default face. */
- XGCValues *scratch_cursor_gc;
+ GC scratch_cursor_gc;
/* These variables describe the range of text currently shown in its
mouse-face, together with the window they apply to. As long as
@@ -388,7 +388,7 @@ struct mac_output {
/* Relief GCs, colors etc. */
struct relief
{
- XGCValues *gc;
+ GC gc;
unsigned long pixel;
int allocated_p;
}
@@ -601,6 +601,8 @@ EXFUN (Fx_display_color_p, 1);
EXFUN (Fx_display_grayscale_p, 1);
EXFUN (Fx_display_planes, 1);
extern void x_free_gcs P_ ((struct frame *));
+extern int XParseGeometry P_ ((char *, int *, int *, unsigned int *,
+ unsigned int *));
/* Defined in macterm.c. */
@@ -614,6 +616,7 @@ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *,
unsigned long, unsigned long,
unsigned int));
extern void XFreePixmap P_ ((Display *, Pixmap));
+extern GC XCreateGC P_ ((Display *, Window, unsigned long, XGCValues *));
extern void XSetForeground P_ ((Display *, GC, unsigned long));
extern void XSetBackground P_ ((Display *, GC, unsigned long));
extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long));
diff --git a/src/minibuf.c b/src/minibuf.c
index cb843375e82..2a54fae8b01 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -349,7 +349,7 @@ BUFFER can be a buffer or a buffer name. */)
DEFUN ("minibuffer-prompt-end", Fminibuffer_prompt_end,
Sminibuffer_prompt_end, 0, 0, 0,
doc: /* Return the buffer position of the end of the minibuffer prompt.
-Return (point-min) if current buffer is not a mini-buffer. */)
+Return (point-min) if current buffer is not a minibuffer. */)
()
{
/* This function is written to be most efficient when there's a prompt. */
@@ -1014,7 +1014,7 @@ DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0,
Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
is a string to insert in the minibuffer before reading.
\(INITIAL-CONTENTS can also be a cons of a string and an integer. Such
-arguments are used as in `read-from-minibuffer') */)
+arguments are used as in `read-from-minibuffer'.) */)
(prompt, initial_contents)
Lisp_Object prompt, initial_contents;
{
@@ -1758,7 +1758,7 @@ the values STRING, PREDICATE and `lambda'. */)
|| NILP (alist))
{
tem = Fassoc_string (string, alist, completion_ignore_case ? Qt : Qnil);
- if NILP (tem)
+ if (NILP (tem))
return Qnil;
}
else if (VECTORP (alist))
diff --git a/src/search.c b/src/search.c
index 387abacc161..3b212e007e8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3047,6 +3047,7 @@ syms_of_search ()
searchbufs[i].regexp = Qnil;
searchbufs[i].whitespace_regexp = Qnil;
staticpro (&searchbufs[i].regexp);
+ staticpro (&searchbufs[i].whitespace_regexp);
searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]);
}
searchbuf_head = &searchbufs[0];
diff --git a/src/syntax.c b/src/syntax.c
index 0ceab9d6af8..a859250b15a 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3391,6 +3391,14 @@ syms_of_syntax ()
staticpro (&Vsyntax_code_object);
+ staticpro (&gl_state.object);
+ staticpro (&gl_state.global_code);
+ staticpro (&gl_state.current_syntax_table);
+ staticpro (&gl_state.old_prop);
+
+ /* Defined in regex.c */
+ staticpro (&re_match_object);
+
Qscan_error = intern ("scan-error");
staticpro (&Qscan_error);
Fput (Qscan_error, Qerror_conditions,
diff --git a/src/textprop.c b/src/textprop.c
index 718051e38f2..ec75c6907ae 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -719,7 +719,7 @@ it finds a change in some text property, or the beginning or end of an
overlay, and returns the position of that.
If none is found, the function returns (point-max).
-If the optional third argument LIMIT is non-nil, don't search
+If the optional second argument LIMIT is non-nil, don't search
past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
(position, limit)
Lisp_Object position, limit;
@@ -744,7 +744,7 @@ finds a change in some text property, or the beginning or end of an
overlay, and returns the position of that.
If none is found, the function returns (point-max).
-If the optional third argument LIMIT is non-nil, don't search
+If the optional second argument LIMIT is non-nil, don't search
past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
(position, limit)
Lisp_Object position, limit;
diff --git a/src/w32.c b/src/w32.c
index 77959037913..25283c3b4c6 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -20,8 +20,6 @@ Boston, MA 02110-1301, USA.
Geoff Voelker (voelker@cs.washington.edu) 7-29-94
*/
-
-
#include <stddef.h> /* for offsetof */
#include <stdlib.h>
#include <stdio.h>
@@ -73,6 +71,7 @@ Boston, MA 02110-1301, USA.
#define _ANONYMOUS_STRUCT
#endif
#include <windows.h>
+#include <shlobj.h>
#ifdef HAVE_SOCKETS /* TCP connection support, if kernel can do it */
#include <sys/socket.h>
@@ -100,6 +99,9 @@ Boston, MA 02110-1301, USA.
#include "w32heap.h"
#include "systime.h"
+typedef HRESULT (WINAPI * ShGetFolderPath_fn)
+ (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *);
+
void globals_of_w32 ();
extern Lisp_Object Vw32_downcase_file_names;
@@ -903,7 +905,9 @@ init_environment (char ** argv)
static const char * const tempdirs[] = {
"$TMPDIR", "$TEMP", "$TMP", "c:/"
};
+
int i;
+
const int imax = sizeof (tempdirs) / sizeof (tempdirs[0]);
/* Make sure they have a usable $TMPDIR. Many Emacs functions use
@@ -942,6 +946,8 @@ init_environment (char ** argv)
LPBYTE lpval;
DWORD dwType;
char locale_name[32];
+ struct stat ignored;
+ char default_home[MAX_PATH];
static struct env_entry
{
@@ -964,6 +970,35 @@ init_environment (char ** argv)
{"LANG", NULL},
};
+ /* For backwards compatibility, check if a .emacs file exists in C:/
+ If not, then we can try to default to the appdata directory under the
+ user's profile, which is more likely to be writable. */
+ if (stat ("C:/.emacs", &ignored) < 0)
+ {
+ HRESULT profile_result;
+ /* Dynamically load ShGetFolderPath, as it won't exist on versions
+ of Windows 95 and NT4 that have not been updated to include
+ MSIE 5. Also we don't link with shell32.dll by default. */
+ HMODULE shell32_dll;
+ ShGetFolderPath_fn get_folder_path;
+ shell32_dll = GetModuleHandle ("shell32.dll");
+ get_folder_path = (ShGetFolderPath_fn)
+ GetProcAddress (shell32_dll, "SHGetFolderPathA");
+
+ if (get_folder_path != NULL)
+ {
+ profile_result = get_folder_path (NULL, CSIDL_APPDATA, NULL,
+ 0, default_home);
+
+ /* If we can't get the appdata dir, revert to old behaviour. */
+ if (profile_result == S_OK)
+ env_vars[0].def_value = default_home;
+ }
+
+ /* Unload shell32.dll, it is not needed anymore. */
+ FreeLibrary (shell32_dll);
+ }
+
/* Get default locale info and use it for LANG. */
if (GetLocaleInfo (LOCALE_USER_DEFAULT,
LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP,
diff --git a/src/w32fns.c b/src/w32fns.c
index 236aa81d7a8..6bcb668aa8b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -154,7 +154,7 @@ int display_hourglass_p;
over text or in the modeline. */
Lisp_Object Vx_pointer_shape, Vx_nontext_pointer_shape, Vx_mode_pointer_shape;
-Lisp_Object Vx_hourglass_pointer_shape, Vx_window_horizontal_drag_shape, Vx_hand_shape;
+Lisp_Object Vx_hourglass_pointer_shape, Vx_window_horizontal_drag_shape;
/* The shape when over mouse-sensitive text. */
@@ -8822,6 +8822,8 @@ versions of Windows) characters. */);
staticpro (&Qw32_charset_ansi);
Qw32_charset_ansi = intern ("w32-charset-ansi");
staticpro (&Qw32_charset_symbol);
+ Qw32_charset_default = intern ("w32-charset-default");
+ staticpro (&Qw32_charset_default);
Qw32_charset_symbol = intern ("w32-charset-symbol");
staticpro (&Qw32_charset_shiftjis);
Qw32_charset_shiftjis = intern ("w32-charset-shiftjis");
diff --git a/src/w32proc.c b/src/w32proc.c
index 0e3f8f2fd47..7e344985f4e 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -2146,6 +2146,8 @@ syms_of_ntproc ()
{
Qhigh = intern ("high");
Qlow = intern ("low");
+ staticpro (&Qhigh);
+ staticpro (&Qlow);
#ifdef HAVE_SOCKETS
defsubr (&Sw32_has_winsock);
@@ -2241,6 +2243,9 @@ the truename of a file can be slow. */);
Note that this option is only useful for files on NTFS volumes, where hard links
are supported. Moreover, it slows down `file-attributes' noticeably. */);
Vw32_get_true_file_attributes = Qt;
+
+ staticpro (&Vw32_valid_locale_ids);
+ staticpro (&Vw32_valid_codepages);
}
/* end of ntproc.c */
diff --git a/src/window.c b/src/window.c
index 9ae9bbf55f4..d926cedc96a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6246,33 +6246,33 @@ Second arg LEFT-WIDTH specifies the number of character cells to
reserve for the left marginal area. Optional third arg RIGHT-WIDTH
does the same for the right marginal area. A nil width parameter
means no margin. */)
- (window, left, right)
- Lisp_Object window, left, right;
+ (window, left_width, right_width)
+ Lisp_Object window, left_width, right_width;
{
struct window *w = decode_window (window);
/* Translate negative or zero widths to nil.
Margins that are too wide have to be checked elsewhere. */
- if (!NILP (left))
+ if (!NILP (left_width))
{
- CHECK_NUMBER (left);
- if (XINT (left) <= 0)
- left = Qnil;
+ CHECK_NUMBER (left_width);
+ if (XINT (left_width) <= 0)
+ left_width = Qnil;
}
- if (!NILP (right))
+ if (!NILP (right_width))
{
- CHECK_NUMBER (right);
- if (XINT (right) <= 0)
- right = Qnil;
+ CHECK_NUMBER (right_width);
+ if (XINT (right_width) <= 0)
+ right_width = Qnil;
}
- if (!EQ (w->left_margin_cols, left)
- || !EQ (w->right_margin_cols, right))
+ if (!EQ (w->left_margin_cols, left_width)
+ || !EQ (w->right_margin_cols, right_width))
{
- w->left_margin_cols = left;
- w->right_margin_cols = right;
+ w->left_margin_cols = left_width;
+ w->right_margin_cols = right_width;
adjust_window_margins (w);
@@ -6317,22 +6317,22 @@ the command `set-fringe-style'.
If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes
outside of the display margins. By default, fringes are drawn between
display marginal areas and the text area. */)
- (window, left, right, outside_margins)
- Lisp_Object window, left, right, outside_margins;
+ (window, left_width, right_width, outside_margins)
+ Lisp_Object window, left_width, right_width, outside_margins;
{
struct window *w = decode_window (window);
- if (!NILP (left))
- CHECK_NATNUM (left);
- if (!NILP (right))
- CHECK_NATNUM (right);
+ if (!NILP (left_width))
+ CHECK_NATNUM (left_width);
+ if (!NILP (right_width))
+ CHECK_NATNUM (right_width);
- if (!EQ (w->left_fringe_width, left)
- || !EQ (w->right_fringe_width, right)
+ if (!EQ (w->left_fringe_width, left_width)
+ || !EQ (w->right_fringe_width, right_width)
|| !EQ (w->fringes_outside_margins, outside_margins))
{
- w->left_fringe_width = left;
- w->right_fringe_width = right;
+ w->left_fringe_width = left_width;
+ w->right_fringe_width = right_width;
w->fringes_outside_margins = outside_margins;
adjust_window_margins (w);
diff --git a/src/xdisp.c b/src/xdisp.c
index d1229b3cb9f..f1316969577 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5967,6 +5967,15 @@ next_element_from_composition (it)
Moving an iterator without producing glyphs
***********************************************************************/
+/* Check if iterator is at a position corresponding to a valid buffer
+ position after some move_it_ call. */
+
+#define IT_POS_VALID_AFTER_MOVE_P(it) \
+ ((it)->method == GET_FROM_STRING \
+ ? IT_STRING_CHARPOS (*it) == 0 \
+ : 1)
+
+
/* Move iterator IT to a specified buffer or X position within one
line on the display without producing glyphs.
@@ -6490,7 +6499,7 @@ move_it_vertically_backward (it, dy)
move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
MOVE_TO_POS | MOVE_TO_VPOS);
}
- while (it2.method != GET_FROM_BUFFER);
+ while (!IT_POS_VALID_AFTER_MOVE_P (&it2));
xassert (IT_CHARPOS (*it) >= BEGV);
it3 = it2;
@@ -6690,7 +6699,7 @@ move_it_by_lines (it, dvpos, need_y_p)
else if (dvpos > 0)
{
move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS);
- if (it->method != GET_FROM_BUFFER)
+ if (!IT_POS_VALID_AFTER_MOVE_P (it))
move_it_to (it, IT_CHARPOS (*it) + 1, -1, -1, -1, MOVE_TO_POS);
}
else
@@ -6712,13 +6721,13 @@ move_it_by_lines (it, dvpos, need_y_p)
reseat (it, it->current.pos, 1);
/* Move further back if we end up in a string or an image. */
- while (it->method != GET_FROM_BUFFER)
+ while (!IT_POS_VALID_AFTER_MOVE_P (it))
{
/* First try to move to start of display line. */
dvpos += it->vpos;
move_it_vertically_backward (it, 0);
dvpos -= it->vpos;
- if (it->method == GET_FROM_BUFFER)
+ if (IT_POS_VALID_AFTER_MOVE_P (it))
break;
/* If start of line is still in string or image,
move further back. */
@@ -10182,7 +10191,9 @@ select_frame_for_redisplay (frame)
(BUFFER_LOCAL_VALUEP (val)
|| SOME_BUFFER_LOCAL_VALUEP (val)))
&& XBUFFER_LOCAL_VALUE (val)->check_frame)
- Fsymbol_value (sym);
+ /* Use find_symbol_value rather than Fsymbol_value
+ to avoid an error if it is void. */
+ find_symbol_value (sym);
for (tail = XFRAME (old)->param_alist; CONSP (tail); tail = XCDR (tail))
if (CONSP (XCAR (tail))
@@ -10193,7 +10204,7 @@ select_frame_for_redisplay (frame)
(BUFFER_LOCAL_VALUEP (val)
|| SOME_BUFFER_LOCAL_VALUEP (val)))
&& XBUFFER_LOCAL_VALUE (val)->check_frame)
- Fsymbol_value (sym);
+ find_symbol_value (sym);
}
@@ -10267,6 +10278,16 @@ redisplay_internal (preserve_echo_area)
++redisplaying_p;
specbind (Qinhibit_free_realized_faces, Qnil);
+ {
+ Lisp_Object tail, frame;
+
+ FOR_EACH_FRAME (tail, frame)
+ {
+ struct frame *f = XFRAME (frame);
+ f->already_hscrolled_p = 0;
+ }
+ }
+
retry:
pause = 0;
reconsider_clip_changes (w, current_buffer);
@@ -10701,8 +10722,12 @@ redisplay_internal (preserve_echo_area)
if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f))
{
/* See if we have to hscroll. */
- if (hscroll_windows (f->root_window))
- goto retry;
+ if (!f->already_hscrolled_p)
+ {
+ f->already_hscrolled_p = 1;
+ if (hscroll_windows (f->root_window))
+ goto retry;
+ }
/* Prevent various kinds of signals during display
update. stdio is not robust about handling
diff --git a/src/xfaces.c b/src/xfaces.c
index 1e56955a03a..45379c7dd8c 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -783,8 +783,6 @@ x_free_gc (f, gc)
#ifdef MAC_OS
/* Mac OS emulation of GCs */
-extern XGCValues *XCreateGC (void *, Window, unsigned long, XGCValues *);
-
static INLINE GC
x_create_gc (f, mask, xgcv)
struct frame *f;
@@ -3988,7 +3986,7 @@ Value is a vector of face attributes. */)
DEFUN ("internal-lisp-face-p", Finternal_lisp_face_p,
Sinternal_lisp_face_p, 1, 2, 0,
doc: /* Return non-nil if FACE names a face.
-If optional second parameter FRAME is non-nil, check for the
+If optional second argument FRAME is non-nil, check for the
existence of a frame-local face with name FACE on that frame.
Otherwise check for the existence of a global face. */)
(face, frame)