diff options
| author | Karoly Lorentey | 2005-05-28 21:04:38 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-05-28 21:04:38 +0000 |
| commit | 93d7a3669284221c9272784875f69c047873fe04 (patch) | |
| tree | 853af54aa3e46a73bd248dc7033dbf4e39132f9f /src | |
| parent | b4bb3cbc7caca5c9c207d9ed42cacb978790af67 (diff) | |
| parent | 9594f9294b16c3e828b593c4cc9159b6328e1aa3 (diff) | |
| download | emacs-93d7a3669284221c9272784875f69c047873fe04.tar.gz emacs-93d7a3669284221c9272784875f69c047873fe04.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 70-73, 320-331)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-320
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-321
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-322
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-323
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-324
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-325
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-326
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-327
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-328
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-329
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-330
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-331
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-70
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-71
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-72
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-73
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-348
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 106 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/buffer.c | 36 | ||||
| -rw-r--r-- | src/ccl.c | 72 | ||||
| -rw-r--r-- | src/ccl.h | 7 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/eval.c | 5 | ||||
| -rw-r--r-- | src/fileio.c | 10 | ||||
| -rw-r--r-- | src/fns.c | 4 | ||||
| -rw-r--r-- | src/image.c | 39 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/macmenu.c | 29 | ||||
| -rw-r--r-- | src/process.c | 3 | ||||
| -rw-r--r-- | src/termcap.c | 1 | ||||
| -rw-r--r-- | src/w32menu.c | 29 | ||||
| -rw-r--r-- | src/window.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 136 | ||||
| -rw-r--r-- | src/xmenu.c | 46 | ||||
| -rw-r--r-- | src/xterm.c | 1 |
20 files changed, 432 insertions, 108 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 951bf142541..8c64defd5db 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,6 +1,110 @@ | |||
| 1 | 2005-05-28 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * xdisp.c (note_mode_line_or_margin_highlight): Change the | ||
| 4 | pointer to a hand cursor when hoovering over a mouse-face. | ||
| 5 | |||
| 6 | 2005-05-27 Kenichi Handa <handa@m17n.org> | ||
| 7 | |||
| 8 | * xterm.c (x_encode_char): Call check_ccl_update in advance. | ||
| 9 | |||
| 10 | * ccl.c: Now an element of Vccl_program_table is a vector of | ||
| 11 | length 4, not 3. | ||
| 12 | (ccl_get_compiled_code): New arg idx. Caller changed. Adjusted | ||
| 13 | for the change of Vccl_program_table. | ||
| 14 | (setup_ccl_program): Adjusted for the change of | ||
| 15 | Vccl_program_table. | ||
| 16 | (check_ccl_update): New function. | ||
| 17 | (Fregister_ccl_program): Use ASET to set an element of a vector. | ||
| 18 | Adjusted for the change of Vccl_program_table. | ||
| 19 | |||
| 20 | * ccl.h (struct ccl_program): New member idx. | ||
| 21 | (check_ccl_update): Extern it. | ||
| 22 | |||
| 23 | 2005-05-27 Juanma Barranquero <lekktu@gmail.com> | ||
| 24 | |||
| 25 | * image.c (Vimage_library_alist): Moved from image.el. | ||
| 26 | (syms_of_image): Defvar it. | ||
| 27 | (lookup_image_type): Use it. | ||
| 28 | |||
| 29 | * buffer.c (Fbuffer_local_value): Make argument name match its use | ||
| 30 | in docstring. | ||
| 31 | |||
| 32 | 2005-05-26 Juanma Barranquero <lekktu@gmail.com> | ||
| 33 | |||
| 34 | * keyboard.c (Frecursive_edit): Fix typo in docstring. | ||
| 35 | (Fposn_at_x_y): Make argument name match its use in docstring. | ||
| 36 | |||
| 37 | 2005-05-26 Lute Kamstra <lute@gnu.org> | ||
| 38 | |||
| 39 | * eval.c (Frun_hooks): Mention run-mode-hooks in docstring. | ||
| 40 | |||
| 41 | 2005-05-24 Masatake YAMATO <jet@gyve.org> | ||
| 42 | |||
| 43 | * xdisp.c (note_mode_line_or_margin_highlight): Use b and e | ||
| 44 | as loop sentinels. | ||
| 45 | |||
| 46 | 2005-05-24 Nick Roberts <nickrob@snap.net.nz> | ||
| 47 | |||
| 48 | * xmenu.c (Fx_popup_dialog): Add a third boolean argument to | ||
| 49 | select frame title ("Question"/"Information"). | ||
| 50 | (xdialog_show): Use it. | ||
| 51 | |||
| 52 | * macmenu.c (Fx_popup_dialog, mac_dialog_show): As for xmenu.c. | ||
| 53 | |||
| 54 | * w32menu.c (Fx_popup_dialog, w32_dialog_show): As for xmenu.c. | ||
| 55 | |||
| 56 | * fns.c (Fyes_or_no_p, Fy_or_n_p): Call Fx_popup_dialog with | ||
| 57 | a third argument (Qnil). | ||
| 58 | |||
| 59 | * lisp.h: x-popup-dialog can have three arguments. | ||
| 60 | |||
| 61 | * editfns.c (Fmessage_box): Use "Information" for frame title. | ||
| 62 | |||
| 63 | 2005-05-23 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 64 | |||
| 65 | * termcap.c [VMS]: Include <starlet.h>. | ||
| 66 | |||
| 67 | 2005-05-23 Masatake YAMATO <jet@gyve.org> | ||
| 68 | |||
| 69 | * xdisp.c (note_mode_line_or_margin_highlight): Add code | ||
| 70 | for mouse-face. Change the type of the first argument from `window' | ||
| 71 | to `Lisp_Object'. | ||
| 72 | (note_mouse_highlight): Call note_mode_line_or_margin_highlight with | ||
| 73 | window instead of w. | ||
| 74 | |||
| 75 | 2005-05-22 Andreas Schwab <schwab@suse.de> | ||
| 76 | |||
| 77 | * process.c (send_process): Move misplaced volatile. | ||
| 78 | |||
| 79 | 2005-05-21 Richard M. Stallman <rms@gnu.org> | ||
| 80 | |||
| 81 | * xdisp.c (display_mode_element): If we're processing a list and | ||
| 82 | padding is specified, put it after the last element. | ||
| 83 | |||
| 84 | 2005-05-21 Eli Zaretskii <eliz@gnu.org> | ||
| 85 | |||
| 86 | * fileio.c (Fexpand_file_name) [DOS_NT]: Don't try to support | ||
| 87 | "superroot" on DOS_NT systems. | ||
| 88 | |||
| 89 | 2005-05-21 David Hunter <hunterd42@comcast.net> (tiny change) | ||
| 90 | |||
| 91 | * process.c (send_process): Restore the SIGPIPE handler if we | ||
| 92 | catch a SIGPIPE. | ||
| 93 | |||
| 94 | 2005-05-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 95 | |||
| 96 | * image.c (lookup_image, png_read_from_memory): Remove hacks (and | ||
| 97 | misleading comments). | ||
| 98 | (DEF_IMGLIB_FN): Use C calling convention for image libraries. | ||
| 99 | |||
| 100 | 2005-05-20 KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp> | ||
| 101 | |||
| 102 | * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges): | ||
| 103 | Correct the right value. | ||
| 104 | |||
| 1 | 2005-05-19 Nick Roberts <nickrob@snap.net.nz> | 105 | 2005-05-19 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 106 | ||
| 3 | * keyboard.c (syms_of_keyboard): Remove lisp variables | 107 | * keyboard.c (syms_of_keyboard): Remove Lisp variables |
| 4 | post-command-idle-hook and post-command-idle-delay. | 108 | post-command-idle-hook and post-command-idle-delay. |
| 5 | (command_loop_1): Don't try to execute post-command-idle-hook. | 109 | (command_loop_1): Don't try to execute post-command-idle-hook. |
| 6 | 110 | ||
diff --git a/src/alloc.c b/src/alloc.c index 35ce8a5cfa1..98fa4be6953 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1685,7 +1685,7 @@ static int total_string_size; | |||
| 1685 | 1685 | ||
| 1686 | /* We check for overrun in string data blocks by appending a small | 1686 | /* We check for overrun in string data blocks by appending a small |
| 1687 | "cookie" after each allocated string data block, and check for the | 1687 | "cookie" after each allocated string data block, and check for the |
| 1688 | presense of this cookie during GC. */ | 1688 | presence of this cookie during GC. */ |
| 1689 | 1689 | ||
| 1690 | #define GC_STRING_OVERRUN_COOKIE_SIZE 4 | 1690 | #define GC_STRING_OVERRUN_COOKIE_SIZE 4 |
| 1691 | static char string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] = | 1691 | static char string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] = |
diff --git a/src/buffer.c b/src/buffer.c index e9567841c8e..dfcf4a9a0b9 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -877,20 +877,20 @@ DEFUN ("buffer-local-value", Fbuffer_local_value, | |||
| 877 | Sbuffer_local_value, 2, 2, 0, | 877 | Sbuffer_local_value, 2, 2, 0, |
| 878 | doc: /* Return the value of VARIABLE in BUFFER. | 878 | doc: /* Return the value of VARIABLE in BUFFER. |
| 879 | If VARIABLE does not have a buffer-local binding in BUFFER, the value | 879 | If VARIABLE does not have a buffer-local binding in BUFFER, the value |
| 880 | is the default binding of variable. */) | 880 | is the default binding of the variable. */) |
| 881 | (symbol, buffer) | 881 | (variable, buffer) |
| 882 | register Lisp_Object symbol; | 882 | register Lisp_Object variable; |
| 883 | register Lisp_Object buffer; | 883 | register Lisp_Object buffer; |
| 884 | { | 884 | { |
| 885 | register struct buffer *buf; | 885 | register struct buffer *buf; |
| 886 | register Lisp_Object result; | 886 | register Lisp_Object result; |
| 887 | 887 | ||
| 888 | CHECK_SYMBOL (symbol); | 888 | CHECK_SYMBOL (variable); |
| 889 | CHECK_BUFFER (buffer); | 889 | CHECK_BUFFER (buffer); |
| 890 | buf = XBUFFER (buffer); | 890 | buf = XBUFFER (buffer); |
| 891 | 891 | ||
| 892 | /* Look in local_var_list */ | 892 | /* Look in local_var_list */ |
| 893 | result = Fassoc (symbol, buf->local_var_alist); | 893 | result = Fassoc (variable, buf->local_var_alist); |
| 894 | if (NILP (result)) | 894 | if (NILP (result)) |
| 895 | { | 895 | { |
| 896 | int offset, idx; | 896 | int offset, idx; |
| @@ -905,7 +905,7 @@ is the default binding of variable. */) | |||
| 905 | idx = PER_BUFFER_IDX (offset); | 905 | idx = PER_BUFFER_IDX (offset); |
| 906 | if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) | 906 | if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) |
| 907 | && SYMBOLP (PER_BUFFER_SYMBOL (offset)) | 907 | && SYMBOLP (PER_BUFFER_SYMBOL (offset)) |
| 908 | && EQ (PER_BUFFER_SYMBOL (offset), symbol)) | 908 | && EQ (PER_BUFFER_SYMBOL (offset), variable)) |
| 909 | { | 909 | { |
| 910 | result = PER_BUFFER_VALUE (buf, offset); | 910 | result = PER_BUFFER_VALUE (buf, offset); |
| 911 | found = 1; | 911 | found = 1; |
| @@ -914,7 +914,7 @@ is the default binding of variable. */) | |||
| 914 | } | 914 | } |
| 915 | 915 | ||
| 916 | if (!found) | 916 | if (!found) |
| 917 | result = Fdefault_value (symbol); | 917 | result = Fdefault_value (variable); |
| 918 | } | 918 | } |
| 919 | else | 919 | else |
| 920 | { | 920 | { |
| @@ -922,7 +922,7 @@ is the default binding of variable. */) | |||
| 922 | Lisp_Object current_alist_element; | 922 | Lisp_Object current_alist_element; |
| 923 | 923 | ||
| 924 | /* What binding is loaded right now? */ | 924 | /* What binding is loaded right now? */ |
| 925 | valcontents = SYMBOL_VALUE (symbol); | 925 | valcontents = SYMBOL_VALUE (variable); |
| 926 | current_alist_element | 926 | current_alist_element |
| 927 | = XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr); | 927 | = XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr); |
| 928 | 928 | ||
| @@ -939,7 +939,7 @@ is the default binding of variable. */) | |||
| 939 | } | 939 | } |
| 940 | 940 | ||
| 941 | if (EQ (result, Qunbound)) | 941 | if (EQ (result, Qunbound)) |
| 942 | return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | 942 | return Fsignal (Qvoid_variable, Fcons (variable, Qnil)); |
| 943 | 943 | ||
| 944 | return result; | 944 | return result; |
| 945 | } | 945 | } |
| @@ -5276,19 +5276,19 @@ This is the same as (default-value 'abbrev-mode). */); | |||
| 5276 | doc: /* Default value of `ctl-arrow' for buffers that do not override it. | 5276 | doc: /* Default value of `ctl-arrow' for buffers that do not override it. |
| 5277 | This is the same as (default-value 'ctl-arrow). */); | 5277 | This is the same as (default-value 'ctl-arrow). */); |
| 5278 | 5278 | ||
| 5279 | DEFVAR_LISP_NOPRO ("default-direction-reversed", | 5279 | DEFVAR_LISP_NOPRO ("default-direction-reversed", |
| 5280 | &buffer_defaults.direction_reversed, | 5280 | &buffer_defaults.direction_reversed, |
| 5281 | doc: /* Default value of `direction-reversed' for buffers that do not override it. | 5281 | doc: /* Default value of `direction-reversed' for buffers that do not override it. |
| 5282 | This is the same as (default-value 'direction-reversed). */); | 5282 | This is the same as (default-value 'direction-reversed). */); |
| 5283 | 5283 | ||
| 5284 | DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", | 5284 | DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", |
| 5285 | &buffer_defaults.enable_multibyte_characters, | 5285 | &buffer_defaults.enable_multibyte_characters, |
| 5286 | doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. | 5286 | doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. |
| 5287 | This is the same as (default-value 'enable-multibyte-characters). */); | 5287 | This is the same as (default-value 'enable-multibyte-characters). */); |
| 5288 | 5288 | ||
| 5289 | DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", | 5289 | DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", |
| 5290 | &buffer_defaults.buffer_file_coding_system, | 5290 | &buffer_defaults.buffer_file_coding_system, |
| 5291 | doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. | 5291 | doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. |
| 5292 | This is the same as (default-value 'buffer-file-coding-system). */); | 5292 | This is the same as (default-value 'buffer-file-coding-system). */); |
| 5293 | 5293 | ||
| 5294 | DEFVAR_LISP_NOPRO ("default-truncate-lines", | 5294 | DEFVAR_LISP_NOPRO ("default-truncate-lines", |
| @@ -49,10 +49,12 @@ Lisp_Object Qcode_conversion_map_id; | |||
| 49 | Lisp_Object Qccl_program_idx; | 49 | Lisp_Object Qccl_program_idx; |
| 50 | 50 | ||
| 51 | /* Table of registered CCL programs. Each element is a vector of | 51 | /* Table of registered CCL programs. Each element is a vector of |
| 52 | NAME, CCL_PROG, and RESOLVEDP where NAME (symbol) is the name of | 52 | NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the |
| 53 | the program, CCL_PROG (vector) is the compiled code of the program, | 53 | name of the program, CCL_PROG (vector) is the compiled code of the |
| 54 | RESOLVEDP (t or nil) is the flag to tell if symbols in CCL_PROG is | 54 | program, RESOLVEDP (t or nil) is the flag to tell if symbols in |
| 55 | already resolved to index numbers or not. */ | 55 | CCL_PROG is already resolved to index numbers or not, UPDATEDP (t |
| 56 | or nil) is the flat to tell if the CCL program is updated after it | ||
| 57 | was once used. */ | ||
| 56 | Lisp_Object Vccl_program_table; | 58 | Lisp_Object Vccl_program_table; |
| 57 | 59 | ||
| 58 | /* Vector of registered hash tables for translation. */ | 60 | /* Vector of registered hash tables for translation. */ |
| @@ -2028,14 +2030,16 @@ resolve_symbol_ccl_program (ccl) | |||
| 2028 | symbols, return Qnil. */ | 2030 | symbols, return Qnil. */ |
| 2029 | 2031 | ||
| 2030 | static Lisp_Object | 2032 | static Lisp_Object |
| 2031 | ccl_get_compiled_code (ccl_prog) | 2033 | ccl_get_compiled_code (ccl_prog, idx) |
| 2032 | Lisp_Object ccl_prog; | 2034 | Lisp_Object ccl_prog; |
| 2035 | int *idx; | ||
| 2033 | { | 2036 | { |
| 2034 | Lisp_Object val, slot; | 2037 | Lisp_Object val, slot; |
| 2035 | 2038 | ||
| 2036 | if (VECTORP (ccl_prog)) | 2039 | if (VECTORP (ccl_prog)) |
| 2037 | { | 2040 | { |
| 2038 | val = resolve_symbol_ccl_program (ccl_prog); | 2041 | val = resolve_symbol_ccl_program (ccl_prog); |
| 2042 | *idx = -1; | ||
| 2039 | return (VECTORP (val) ? val : Qnil); | 2043 | return (VECTORP (val) ? val : Qnil); |
| 2040 | } | 2044 | } |
| 2041 | if (!SYMBOLP (ccl_prog)) | 2045 | if (!SYMBOLP (ccl_prog)) |
| @@ -2047,9 +2051,10 @@ ccl_get_compiled_code (ccl_prog) | |||
| 2047 | return Qnil; | 2051 | return Qnil; |
| 2048 | slot = AREF (Vccl_program_table, XINT (val)); | 2052 | slot = AREF (Vccl_program_table, XINT (val)); |
| 2049 | if (! VECTORP (slot) | 2053 | if (! VECTORP (slot) |
| 2050 | || ASIZE (slot) != 3 | 2054 | || ASIZE (slot) != 4 |
| 2051 | || ! VECTORP (AREF (slot, 1))) | 2055 | || ! VECTORP (AREF (slot, 1))) |
| 2052 | return Qnil; | 2056 | return Qnil; |
| 2057 | *idx = XINT (val); | ||
| 2053 | if (NILP (AREF (slot, 2))) | 2058 | if (NILP (AREF (slot, 2))) |
| 2054 | { | 2059 | { |
| 2055 | val = resolve_symbol_ccl_program (AREF (slot, 1)); | 2060 | val = resolve_symbol_ccl_program (AREF (slot, 1)); |
| @@ -2078,7 +2083,7 @@ setup_ccl_program (ccl, ccl_prog) | |||
| 2078 | { | 2083 | { |
| 2079 | struct Lisp_Vector *vp; | 2084 | struct Lisp_Vector *vp; |
| 2080 | 2085 | ||
| 2081 | ccl_prog = ccl_get_compiled_code (ccl_prog); | 2086 | ccl_prog = ccl_get_compiled_code (ccl_prog, &ccl->idx); |
| 2082 | if (! VECTORP (ccl_prog)) | 2087 | if (! VECTORP (ccl_prog)) |
| 2083 | return -1; | 2088 | return -1; |
| 2084 | vp = XVECTOR (ccl_prog); | 2089 | vp = XVECTOR (ccl_prog); |
| @@ -2086,6 +2091,13 @@ setup_ccl_program (ccl, ccl_prog) | |||
| 2086 | ccl->prog = vp->contents; | 2091 | ccl->prog = vp->contents; |
| 2087 | ccl->eof_ic = XINT (vp->contents[CCL_HEADER_EOF]); | 2092 | ccl->eof_ic = XINT (vp->contents[CCL_HEADER_EOF]); |
| 2088 | ccl->buf_magnification = XINT (vp->contents[CCL_HEADER_BUF_MAG]); | 2093 | ccl->buf_magnification = XINT (vp->contents[CCL_HEADER_BUF_MAG]); |
| 2094 | if (ccl->idx >= 0) | ||
| 2095 | { | ||
| 2096 | Lisp_Object slot; | ||
| 2097 | |||
| 2098 | slot = AREF (Vccl_program_table, ccl->idx); | ||
| 2099 | ASET (slot, 3, Qnil); | ||
| 2100 | } | ||
| 2089 | } | 2101 | } |
| 2090 | ccl->ic = CCL_HEADER_MAIN; | 2102 | ccl->ic = CCL_HEADER_MAIN; |
| 2091 | for (i = 0; i < 8; i++) | 2103 | for (i = 0; i < 8; i++) |
| @@ -2100,6 +2112,33 @@ setup_ccl_program (ccl, ccl_prog) | |||
| 2100 | return 0; | 2112 | return 0; |
| 2101 | } | 2113 | } |
| 2102 | 2114 | ||
| 2115 | |||
| 2116 | /* Check if CCL is updated or not. If not, re-setup members of CCL. */ | ||
| 2117 | |||
| 2118 | int | ||
| 2119 | check_ccl_update (ccl) | ||
| 2120 | struct ccl_program *ccl; | ||
| 2121 | { | ||
| 2122 | struct Lisp_Vector *vp; | ||
| 2123 | Lisp_Object slot, ccl_prog; | ||
| 2124 | |||
| 2125 | if (ccl->idx < 0) | ||
| 2126 | return 0; | ||
| 2127 | slot = AREF (Vccl_program_table, ccl->idx); | ||
| 2128 | if (NILP (AREF (slot, 3))) | ||
| 2129 | return 0; | ||
| 2130 | ccl_prog = ccl_get_compiled_code (AREF (slot, 0), &ccl->idx); | ||
| 2131 | if (! VECTORP (ccl_prog)) | ||
| 2132 | return -1; | ||
| 2133 | ccl->size = ASIZE (ccl_prog); | ||
| 2134 | ccl->prog = XVECTOR (ccl_prog)->contents; | ||
| 2135 | ccl->eof_ic = XINT (AREF (ccl_prog, CCL_HEADER_EOF)); | ||
| 2136 | ccl->buf_magnification = XINT (AREF (ccl_prog, CCL_HEADER_BUF_MAG)); | ||
| 2137 | ASET (slot, 3, Qnil); | ||
| 2138 | return 0; | ||
| 2139 | } | ||
| 2140 | |||
| 2141 | |||
| 2103 | DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, | 2142 | DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, |
| 2104 | doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. | 2143 | doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. |
| 2105 | See the documentation of `define-ccl-program' for the detail of CCL program. */) | 2144 | See the documentation of `define-ccl-program' for the detail of CCL program. */) |
| @@ -2298,8 +2337,9 @@ Return index number of the registered CCL program. */) | |||
| 2298 | if (EQ (name, AREF (slot, 0))) | 2337 | if (EQ (name, AREF (slot, 0))) |
| 2299 | { | 2338 | { |
| 2300 | /* Update this slot. */ | 2339 | /* Update this slot. */ |
| 2301 | AREF (slot, 1) = ccl_prog; | 2340 | ASET (slot, 1, ccl_prog); |
| 2302 | AREF (slot, 2) = resolved; | 2341 | ASET (slot, 2, resolved); |
| 2342 | ASET (slot, 3, Qt); | ||
| 2303 | return make_number (idx); | 2343 | return make_number (idx); |
| 2304 | } | 2344 | } |
| 2305 | } | 2345 | } |
| @@ -2312,19 +2352,19 @@ Return index number of the registered CCL program. */) | |||
| 2312 | 2352 | ||
| 2313 | new_table = Fmake_vector (make_number (len * 2), Qnil); | 2353 | new_table = Fmake_vector (make_number (len * 2), Qnil); |
| 2314 | for (j = 0; j < len; j++) | 2354 | for (j = 0; j < len; j++) |
| 2315 | AREF (new_table, j) | 2355 | ASET (new_table, j, AREF (Vccl_program_table, j)); |
| 2316 | = AREF (Vccl_program_table, j); | ||
| 2317 | Vccl_program_table = new_table; | 2356 | Vccl_program_table = new_table; |
| 2318 | } | 2357 | } |
| 2319 | 2358 | ||
| 2320 | { | 2359 | { |
| 2321 | Lisp_Object elt; | 2360 | Lisp_Object elt; |
| 2322 | 2361 | ||
| 2323 | elt = Fmake_vector (make_number (3), Qnil); | 2362 | elt = Fmake_vector (make_number (4), Qnil); |
| 2324 | AREF (elt, 0) = name; | 2363 | ASET (elt, 0, name); |
| 2325 | AREF (elt, 1) = ccl_prog; | 2364 | ASET (elt, 1, ccl_prog); |
| 2326 | AREF (elt, 2) = resolved; | 2365 | ASET (elt, 2, resolved); |
| 2327 | AREF (Vccl_program_table, idx) = elt; | 2366 | ASET (elt, 3, Qt); |
| 2367 | ASET (Vccl_program_table, idx, elt); | ||
| 2328 | } | 2368 | } |
| 2329 | 2369 | ||
| 2330 | Fput (name, Qccl_program_idx, make_number (idx)); | 2370 | Fput (name, Qccl_program_idx, make_number (idx)); |
| @@ -33,6 +33,10 @@ Boston, MA 02111-1307, USA. */ | |||
| 33 | /* Structure to hold information about running CCL code. Read | 33 | /* Structure to hold information about running CCL code. Read |
| 34 | comments in the file ccl.c for the detail of each field. */ | 34 | comments in the file ccl.c for the detail of each field. */ |
| 35 | struct ccl_program { | 35 | struct ccl_program { |
| 36 | int idx; /* Index number of the CCL program. | ||
| 37 | -1 means that the program was given | ||
| 38 | by a vector, not by a program | ||
| 39 | name. */ | ||
| 36 | int size; /* Size of the compiled code. */ | 40 | int size; /* Size of the compiled code. */ |
| 37 | Lisp_Object *prog; /* Pointer into the compiled code. */ | 41 | Lisp_Object *prog; /* Pointer into the compiled code. */ |
| 38 | int ic; /* Instruction Counter (index for PROG). */ | 42 | int ic; /* Instruction Counter (index for PROG). */ |
| @@ -90,6 +94,9 @@ extern Lisp_Object Vfont_ccl_encoder_alist; | |||
| 90 | execution of ccl program CCL_PROG (symbol or vector). */ | 94 | execution of ccl program CCL_PROG (symbol or vector). */ |
| 91 | extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object)); | 95 | extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object)); |
| 92 | 96 | ||
| 97 | /* Check if CCL is updated or not. If not, re-setup members of CCL. */ | ||
| 98 | extern int check_ccl_update P_ ((struct ccl_program *)); | ||
| 99 | |||
| 93 | extern int ccl_driver P_ ((struct ccl_program *, unsigned char *, | 100 | extern int ccl_driver P_ ((struct ccl_program *, unsigned char *, |
| 94 | unsigned char *, int, int, int *)); | 101 | unsigned char *, int, int, int *)); |
| 95 | 102 | ||
diff --git a/src/editfns.c b/src/editfns.c index ddf080a0359..4bc5336e997 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3175,7 +3175,7 @@ usage: (message-box STRING &rest ARGS) */) | |||
| 3175 | pane = Fcons (Fcons (build_string ("OK"), Qt), Qnil); | 3175 | pane = Fcons (Fcons (build_string ("OK"), Qt), Qnil); |
| 3176 | GCPRO1 (pane); | 3176 | GCPRO1 (pane); |
| 3177 | menu = Fcons (val, pane); | 3177 | menu = Fcons (val, pane); |
| 3178 | obj = Fx_popup_dialog (Qt, menu); | 3178 | obj = Fx_popup_dialog (Qt, menu, Qt); |
| 3179 | UNGCPRO; | 3179 | UNGCPRO; |
| 3180 | return val; | 3180 | return val; |
| 3181 | } | 3181 | } |
diff --git a/src/eval.c b/src/eval.c index 7f043daa555..8bb201c5df5 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2292,7 +2292,7 @@ static Lisp_Object run_hook_with_args P_ ((int, Lisp_Object *, | |||
| 2292 | enum run_hooks_condition)); | 2292 | enum run_hooks_condition)); |
| 2293 | 2293 | ||
| 2294 | DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, | 2294 | DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, |
| 2295 | doc: /* Run each hook in HOOKS. Major mode functions use this. | 2295 | doc: /* Run each hook in HOOKS. |
| 2296 | Each argument should be a symbol, a hook variable. | 2296 | Each argument should be a symbol, a hook variable. |
| 2297 | These symbols are processed in the order specified. | 2297 | These symbols are processed in the order specified. |
| 2298 | If a hook symbol has a non-nil value, that value may be a function | 2298 | If a hook symbol has a non-nil value, that value may be a function |
| @@ -2300,6 +2300,9 @@ or a list of functions to be called to run the hook. | |||
| 2300 | If the value is a function, it is called with no arguments. | 2300 | If the value is a function, it is called with no arguments. |
| 2301 | If it is a list, the elements are called, in order, with no arguments. | 2301 | If it is a list, the elements are called, in order, with no arguments. |
| 2302 | 2302 | ||
| 2303 | Major modes should not use this function directly to run their mode | ||
| 2304 | hook; they should use `run-mode-hooks' instead. | ||
| 2305 | |||
| 2303 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2306 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2304 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2307 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| 2305 | usage: (run-hooks &rest HOOKS) */) | 2308 | usage: (run-hooks &rest HOOKS) */) |
diff --git a/src/fileio.c b/src/fileio.c index eaa2d184f1d..a31b434c1de 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1653,8 +1653,16 @@ See also the function `substitute-in-file-name'. */) | |||
| 1653 | p += 2; | 1653 | p += 2; |
| 1654 | } | 1654 | } |
| 1655 | else if (IS_DIRECTORY_SEP (p[0]) && p[1] == '.' && p[2] == '.' | 1655 | else if (IS_DIRECTORY_SEP (p[0]) && p[1] == '.' && p[2] == '.' |
| 1656 | /* `/../' is the "superroot" on certain file systems. */ | 1656 | /* `/../' is the "superroot" on certain file systems. |
| 1657 | Turned off on DOS_NT systems because they have no | ||
| 1658 | "superroot" and because this causes us to produce | ||
| 1659 | file names like "d:/../foo" which fail file-related | ||
| 1660 | functions of the underlying OS. (To reproduce, try a | ||
| 1661 | long series of "../../" in default_directory, longer | ||
| 1662 | than the number of levels from the root.) */ | ||
| 1663 | #ifndef DOS_NT | ||
| 1657 | && o != target | 1664 | && o != target |
| 1665 | #endif | ||
| 1658 | && (IS_DIRECTORY_SEP (p[3]) || p[3] == 0)) | 1666 | && (IS_DIRECTORY_SEP (p[3]) || p[3] == 0)) |
| 1659 | { | 1667 | { |
| 1660 | while (o != target && (--o) && !IS_DIRECTORY_SEP (*o)) | 1668 | while (o != target && (--o) && !IS_DIRECTORY_SEP (*o)) |
| @@ -3276,7 +3276,7 @@ is nil and `use-dialog-box' is non-nil. */) | |||
| 3276 | Fcons (Fcons (build_string ("No"), Qnil), | 3276 | Fcons (Fcons (build_string ("No"), Qnil), |
| 3277 | Qnil)); | 3277 | Qnil)); |
| 3278 | menu = Fcons (prompt, pane); | 3278 | menu = Fcons (prompt, pane); |
| 3279 | obj = Fx_popup_dialog (Qt, menu); | 3279 | obj = Fx_popup_dialog (Qt, menu, Qnil); |
| 3280 | answer = !NILP (obj); | 3280 | answer = !NILP (obj); |
| 3281 | break; | 3281 | break; |
| 3282 | } | 3282 | } |
| @@ -3408,7 +3408,7 @@ is nil, and `use-dialog-box' is non-nil. */) | |||
| 3408 | Qnil)); | 3408 | Qnil)); |
| 3409 | GCPRO1 (pane); | 3409 | GCPRO1 (pane); |
| 3410 | menu = Fcons (prompt, pane); | 3410 | menu = Fcons (prompt, pane); |
| 3411 | obj = Fx_popup_dialog (Qt, menu); | 3411 | obj = Fx_popup_dialog (Qt, menu, Qnil); |
| 3412 | UNGCPRO; | 3412 | UNGCPRO; |
| 3413 | return obj; | 3413 | return obj; |
| 3414 | } | 3414 | } |
diff --git a/src/image.c b/src/image.c index f03adfdc48f..15e835fef3b 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -616,6 +616,10 @@ static struct image_type *image_types; | |||
| 616 | 616 | ||
| 617 | Lisp_Object Vimage_types; | 617 | Lisp_Object Vimage_types; |
| 618 | 618 | ||
| 619 | /* An alist of image types and libraries that implement the type. */ | ||
| 620 | |||
| 621 | Lisp_Object Vimage_library_alist; | ||
| 622 | |||
| 619 | /* Cache for delayed-loading image types. */ | 623 | /* Cache for delayed-loading image types. */ |
| 620 | 624 | ||
| 621 | static Lisp_Object Vimage_type_cache; | 625 | static Lisp_Object Vimage_type_cache; |
| @@ -696,7 +700,7 @@ lookup_image_type (symbol) | |||
| 696 | struct image_type *type; | 700 | struct image_type *type; |
| 697 | 701 | ||
| 698 | /* We must initialize the image-type if it hasn't been already. */ | 702 | /* We must initialize the image-type if it hasn't been already. */ |
| 699 | if (NILP (Finit_image_library (symbol, Qnil))) | 703 | if (NILP (Finit_image_library (symbol, Vimage_library_alist))) |
| 700 | return 0; /* unimplemented */ | 704 | return 0; /* unimplemented */ |
| 701 | 705 | ||
| 702 | for (type = image_types; type; type = type->next) | 706 | for (type = image_types; type; type = type->next) |
| @@ -1631,11 +1635,6 @@ lookup_image (f, spec) | |||
| 1631 | Lisp_Object spec; | 1635 | Lisp_Object spec; |
| 1632 | { | 1636 | { |
| 1633 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); | 1637 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); |
| 1634 | #ifdef _MSC_VER | ||
| 1635 | /* Work around a problem with MinGW builds of graphics libraries | ||
| 1636 | not honoring calling conventions. */ | ||
| 1637 | static | ||
| 1638 | #endif | ||
| 1639 | struct image *img; | 1638 | struct image *img; |
| 1640 | int i; | 1639 | int i; |
| 1641 | unsigned hash; | 1640 | unsigned hash; |
| @@ -1815,7 +1814,7 @@ forall_images_in_image_cache (f, fn) | |||
| 1815 | #ifdef HAVE_NTGUI | 1814 | #ifdef HAVE_NTGUI |
| 1816 | 1815 | ||
| 1817 | /* Macro for defining functions that will be loaded from image DLLs. */ | 1816 | /* Macro for defining functions that will be loaded from image DLLs. */ |
| 1818 | #define DEF_IMGLIB_FN(func) FARPROC fn_##func | 1817 | #define DEF_IMGLIB_FN(func) int (FAR CDECL *fn_##func)() |
| 1819 | 1818 | ||
| 1820 | /* Macro for loading those image functions from the library. */ | 1819 | /* Macro for loading those image functions from the library. */ |
| 1821 | #define LOAD_IMGLIB_FN(lib,func) { \ | 1820 | #define LOAD_IMGLIB_FN(lib,func) { \ |
| @@ -5744,12 +5743,6 @@ struct png_memory_storage | |||
| 5744 | PNG_PTR is a pointer to the PNG control structure. Copy LENGTH | 5743 | PNG_PTR is a pointer to the PNG control structure. Copy LENGTH |
| 5745 | bytes from the input to DATA. */ | 5744 | bytes from the input to DATA. */ |
| 5746 | 5745 | ||
| 5747 | #ifdef _MSC_VER | ||
| 5748 | /* Work around a problem with MinGW builds of graphics libraries | ||
| 5749 | not honoring calling conventions. */ | ||
| 5750 | #pragma optimize("g", off) | ||
| 5751 | #endif | ||
| 5752 | |||
| 5753 | static void | 5746 | static void |
| 5754 | png_read_from_memory (png_ptr, data, length) | 5747 | png_read_from_memory (png_ptr, data, length) |
| 5755 | png_structp png_ptr; | 5748 | png_structp png_ptr; |
| @@ -5766,10 +5759,6 @@ png_read_from_memory (png_ptr, data, length) | |||
| 5766 | tbr->index = tbr->index + length; | 5759 | tbr->index = tbr->index + length; |
| 5767 | } | 5760 | } |
| 5768 | 5761 | ||
| 5769 | #ifdef _MSC_VER | ||
| 5770 | /* Restore normal optimization, as specified on the command line. */ | ||
| 5771 | #pragma optimize("", on) | ||
| 5772 | #endif | ||
| 5773 | 5762 | ||
| 5774 | /* Load PNG image IMG for use on frame F. Value is non-zero if | 5763 | /* Load PNG image IMG for use on frame F. Value is non-zero if |
| 5775 | successful. */ | 5764 | successful. */ |
| @@ -8000,6 +7989,8 @@ of `image-library-alist', which see). */) | |||
| 8000 | void | 7989 | void |
| 8001 | syms_of_image () | 7990 | syms_of_image () |
| 8002 | { | 7991 | { |
| 7992 | extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */ | ||
| 7993 | |||
| 8003 | /* Must be defined now becase we're going to update it below, while | 7994 | /* Must be defined now becase we're going to update it below, while |
| 8004 | defining the supported image types. */ | 7995 | defining the supported image types. */ |
| 8005 | DEFVAR_LISP ("image-types", &Vimage_types, | 7996 | DEFVAR_LISP ("image-types", &Vimage_types, |
| @@ -8008,6 +7999,20 @@ Each element of the list is a symbol for a image type, like 'jpeg or 'png. | |||
| 8008 | To check whether it is really supported, use `image-type-available-p'. */); | 7999 | To check whether it is really supported, use `image-type-available-p'. */); |
| 8009 | Vimage_types = Qnil; | 8000 | Vimage_types = Qnil; |
| 8010 | 8001 | ||
| 8002 | DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, | ||
| 8003 | doc: /* Alist of image types vs external libraries needed to display them. | ||
| 8004 | |||
| 8005 | Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol | ||
| 8006 | representing a supported image type, and the rest are strings giving | ||
| 8007 | alternate filenames for the corresponding external libraries. | ||
| 8008 | |||
| 8009 | Emacs tries to load the libraries in the order they appear on the | ||
| 8010 | list; if none is loaded, the running session of Emacs won't | ||
| 8011 | support the image type. Types 'pbm and 'xbm don't need to be | ||
| 8012 | listed; they're always supported. */); | ||
| 8013 | Vimage_library_alist = Qnil; | ||
| 8014 | Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt); | ||
| 8015 | |||
| 8011 | Vimage_type_cache = Qnil; | 8016 | Vimage_type_cache = Qnil; |
| 8012 | staticpro (&Vimage_type_cache); | 8017 | staticpro (&Vimage_type_cache); |
| 8013 | 8018 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 490593750d3..2ccf444964b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1009,7 +1009,7 @@ DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", | |||
| 1009 | doc: /* Invoke the editor command loop recursively. | 1009 | doc: /* Invoke the editor command loop recursively. |
| 1010 | To get out of the recursive edit, a command can do `(throw 'exit nil)'; | 1010 | To get out of the recursive edit, a command can do `(throw 'exit nil)'; |
| 1011 | that tells this function to return. | 1011 | that tells this function to return. |
| 1012 | Alternately, `(throw 'exit t)' makes this function signal an error. | 1012 | Alternatively, `(throw 'exit t)' makes this function signal an error. |
| 1013 | This function is called by the editor initialization to begin editing. */) | 1013 | This function is called by the editor initialization to begin editing. */) |
| 1014 | () | 1014 | () |
| 1015 | { | 1015 | { |
| @@ -10677,7 +10677,7 @@ The elements of this list correspond to the arguments of | |||
| 10677 | DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0, | 10677 | DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0, |
| 10678 | doc: /* Return position information for pixel coordinates X and Y. | 10678 | doc: /* Return position information for pixel coordinates X and Y. |
| 10679 | By default, X and Y are relative to text area of the selected window. | 10679 | By default, X and Y are relative to text area of the selected window. |
| 10680 | Optional third arg FRAME_OR_WINDOW non-nil specifies frame or window. | 10680 | Optional third arg FRAME-OR-WINDOW non-nil specifies frame or window. |
| 10681 | If optional fourth arg WHOLE is non-nil, X is relative to the left | 10681 | If optional fourth arg WHOLE is non-nil, X is relative to the left |
| 10682 | edge of the window. | 10682 | edge of the window. |
| 10683 | 10683 | ||
| @@ -10983,7 +10983,7 @@ syms_of_keyboard () | |||
| 10983 | staticpro (&Qdrag_n_drop); | 10983 | staticpro (&Qdrag_n_drop); |
| 10984 | 10984 | ||
| 10985 | Qsave_session = intern ("save-session"); | 10985 | Qsave_session = intern ("save-session"); |
| 10986 | staticpro(&Qsave_session); | 10986 | staticpro (&Qsave_session); |
| 10987 | 10987 | ||
| 10988 | Qusr1_signal = intern ("usr1-signal"); | 10988 | Qusr1_signal = intern ("usr1-signal"); |
| 10989 | staticpro (&Qusr1_signal); | 10989 | staticpro (&Qusr1_signal); |
diff --git a/src/lisp.h b/src/lisp.h index 58923377f2b..2e356985cdb 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3099,7 +3099,7 @@ extern Lisp_Object next_single_char_property_change P_ ((Lisp_Object, | |||
| 3099 | 3099 | ||
| 3100 | /* defined in xmenu.c */ | 3100 | /* defined in xmenu.c */ |
| 3101 | EXFUN (Fx_popup_menu, 2); | 3101 | EXFUN (Fx_popup_menu, 2); |
| 3102 | EXFUN (Fx_popup_dialog, 2); | 3102 | EXFUN (Fx_popup_dialog, 3); |
| 3103 | extern void syms_of_xmenu P_ ((void)); | 3103 | extern void syms_of_xmenu P_ ((void)); |
| 3104 | 3104 | ||
| 3105 | /* defined in termchar.h */ | 3105 | /* defined in termchar.h */ |
diff --git a/src/macmenu.c b/src/macmenu.c index eb870176f12..54393bca594 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -823,7 +823,7 @@ cached information about equivalent key sequences. */) | |||
| 823 | 823 | ||
| 824 | #ifdef HAVE_MENUS | 824 | #ifdef HAVE_MENUS |
| 825 | 825 | ||
| 826 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0, | 826 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, |
| 827 | doc: /* Pop up a dialog box and return user's selection. | 827 | doc: /* Pop up a dialog box and return user's selection. |
| 828 | POSITION specifies which frame to use. | 828 | POSITION specifies which frame to use. |
| 829 | This is normally a mouse button event or a window or frame. | 829 | This is normally a mouse button event or a window or frame. |
| @@ -838,9 +838,12 @@ The return value is VALUE from the chosen item. | |||
| 838 | An ITEM may also be just a string--that makes a nonselectable item. | 838 | An ITEM may also be just a string--that makes a nonselectable item. |
| 839 | An ITEM may also be nil--that means to put all preceding items | 839 | An ITEM may also be nil--that means to put all preceding items |
| 840 | on the left of the dialog box and all following items on the right. | 840 | on the left of the dialog box and all following items on the right. |
| 841 | \(By default, approximately half appear on each side.) */) | 841 | \(By default, approximately half appear on each side.) |
| 842 | (position, contents) | 842 | |
| 843 | Lisp_Object position, contents; | 843 | If HEADER is non-nil, the frame title for the box is "Information", |
| 844 | otherwise it is "Question". */) | ||
| 845 | (position, contents, header) | ||
| 846 | Lisp_Object position, contents, header; | ||
| 844 | { | 847 | { |
| 845 | FRAME_PTR f = NULL; | 848 | FRAME_PTR f = NULL; |
| 846 | Lisp_Object window; | 849 | Lisp_Object window; |
| @@ -927,7 +930,7 @@ on the left of the dialog box and all following items on the right. | |||
| 927 | 930 | ||
| 928 | /* Display them in a dialog box. */ | 931 | /* Display them in a dialog box. */ |
| 929 | BLOCK_INPUT; | 932 | BLOCK_INPUT; |
| 930 | selection = mac_dialog_show (f, 0, title, &error_name); | 933 | selection = mac_dialog_show (f, 0, title, header, &error_name); |
| 931 | UNBLOCK_INPUT; | 934 | UNBLOCK_INPUT; |
| 932 | 935 | ||
| 933 | discard_menu_items (); | 936 | discard_menu_items (); |
| @@ -2046,10 +2049,10 @@ static char * button_names [] = { | |||
| 2046 | "button6", "button7", "button8", "button9", "button10" }; | 2049 | "button6", "button7", "button8", "button9", "button10" }; |
| 2047 | 2050 | ||
| 2048 | static Lisp_Object | 2051 | static Lisp_Object |
| 2049 | mac_dialog_show (f, keymaps, title, error) | 2052 | mac_dialog_show (f, keymaps, title, header, error) |
| 2050 | FRAME_PTR f; | 2053 | FRAME_PTR f; |
| 2051 | int keymaps; | 2054 | int keymaps; |
| 2052 | Lisp_Object title; | 2055 | Lisp_Object title, header; |
| 2053 | char **error; | 2056 | char **error; |
| 2054 | { | 2057 | { |
| 2055 | int i, nb_buttons=0; | 2058 | int i, nb_buttons=0; |
| @@ -2152,11 +2155,17 @@ mac_dialog_show (f, keymaps, title, error) | |||
| 2152 | wv->name = dialog_name; | 2155 | wv->name = dialog_name; |
| 2153 | wv->help = Qnil; | 2156 | wv->help = Qnil; |
| 2154 | 2157 | ||
| 2158 | /* Frame title: 'Q' = Question, 'I' = Information. | ||
| 2159 | Can also have 'E' = Error if, one day, we want | ||
| 2160 | a popup for errors. */ | ||
| 2161 | if (NILP(header)) | ||
| 2162 | dialog_name[0] = 'Q'; | ||
| 2163 | else | ||
| 2164 | dialog_name[0] = 'I'; | ||
| 2165 | |||
| 2155 | /* Dialog boxes use a really stupid name encoding | 2166 | /* Dialog boxes use a really stupid name encoding |
| 2156 | which specifies how many buttons to use | 2167 | which specifies how many buttons to use |
| 2157 | and how many buttons are on the right. | 2168 | and how many buttons are on the right. */ |
| 2158 | The Q means something also. */ | ||
| 2159 | dialog_name[0] = 'Q'; | ||
| 2160 | dialog_name[1] = '0' + nb_buttons; | 2169 | dialog_name[1] = '0' + nb_buttons; |
| 2161 | dialog_name[2] = 'B'; | 2170 | dialog_name[2] = 'B'; |
| 2162 | dialog_name[3] = 'R'; | 2171 | dialog_name[3] = 'R'; |
diff --git a/src/process.c b/src/process.c index a557ee30c27..41e46c53dc9 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5134,6 +5134,7 @@ send_process (proc, buf, len, object) | |||
| 5134 | int rv; | 5134 | int rv; |
| 5135 | struct coding_system *coding; | 5135 | struct coding_system *coding; |
| 5136 | struct gcpro gcpro1; | 5136 | struct gcpro gcpro1; |
| 5137 | SIGTYPE (*volatile old_sigpipe) (); | ||
| 5137 | 5138 | ||
| 5138 | GCPRO1 (object); | 5139 | GCPRO1 (object); |
| 5139 | 5140 | ||
| @@ -5258,7 +5259,6 @@ send_process (proc, buf, len, object) | |||
| 5258 | while (len > 0) | 5259 | while (len > 0) |
| 5259 | { | 5260 | { |
| 5260 | int this = len; | 5261 | int this = len; |
| 5261 | SIGTYPE (*old_sigpipe)(); | ||
| 5262 | 5262 | ||
| 5263 | /* Decide how much data we can send in one batch. | 5263 | /* Decide how much data we can send in one batch. |
| 5264 | Long lines need to be split into multiple batches. */ | 5264 | Long lines need to be split into multiple batches. */ |
| @@ -5401,6 +5401,7 @@ send_process (proc, buf, len, object) | |||
| 5401 | #endif /* not VMS */ | 5401 | #endif /* not VMS */ |
| 5402 | else | 5402 | else |
| 5403 | { | 5403 | { |
| 5404 | signal (SIGPIPE, old_sigpipe); | ||
| 5404 | #ifndef VMS | 5405 | #ifndef VMS |
| 5405 | proc = process_sent_to; | 5406 | proc = process_sent_to; |
| 5406 | p = XPROCESS (proc); | 5407 | p = XPROCESS (proc); |
diff --git a/src/termcap.c b/src/termcap.c index a1c068e0964..aa30aaa0615 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -458,6 +458,7 @@ static int name_match (); | |||
| 458 | #include <rmsdef.h> | 458 | #include <rmsdef.h> |
| 459 | #include <fab.h> | 459 | #include <fab.h> |
| 460 | #include <nam.h> | 460 | #include <nam.h> |
| 461 | #include <starlet.h> | ||
| 461 | 462 | ||
| 462 | static int | 463 | static int |
| 463 | valid_filename_p (fn) | 464 | valid_filename_p (fn) |
diff --git a/src/w32menu.c b/src/w32menu.c index 4553895d829..8a90eae7ec7 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -845,7 +845,7 @@ cached information about equivalent key sequences. */) | |||
| 845 | 845 | ||
| 846 | #ifdef HAVE_MENUS | 846 | #ifdef HAVE_MENUS |
| 847 | 847 | ||
| 848 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0, | 848 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, |
| 849 | doc: /* Pop up a dialog box and return user's selection. | 849 | doc: /* Pop up a dialog box and return user's selection. |
| 850 | POSITION specifies which frame to use. | 850 | POSITION specifies which frame to use. |
| 851 | This is normally a mouse button event or a window or frame. | 851 | This is normally a mouse button event or a window or frame. |
| @@ -860,9 +860,12 @@ The return value is VALUE from the chosen item. | |||
| 860 | An ITEM may also be just a string--that makes a nonselectable item. | 860 | An ITEM may also be just a string--that makes a nonselectable item. |
| 861 | An ITEM may also be nil--that means to put all preceding items | 861 | An ITEM may also be nil--that means to put all preceding items |
| 862 | on the left of the dialog box and all following items on the right. | 862 | on the left of the dialog box and all following items on the right. |
| 863 | \(By default, approximately half appear on each side.) */) | 863 | \(By default, approximately half appear on each side.) |
| 864 | (position, contents) | 864 | |
| 865 | Lisp_Object position, contents; | 865 | If HEADER is non-nil, the frame title for the box is "Information", |
| 866 | otherwise it is "Question". */) | ||
| 867 | (position, contents, header) | ||
| 868 | Lisp_Object position, contents, header; | ||
| 866 | { | 869 | { |
| 867 | FRAME_PTR f = NULL; | 870 | FRAME_PTR f = NULL; |
| 868 | Lisp_Object window; | 871 | Lisp_Object window; |
| @@ -949,7 +952,7 @@ on the left of the dialog box and all following items on the right. | |||
| 949 | 952 | ||
| 950 | /* Display them in a dialog box. */ | 953 | /* Display them in a dialog box. */ |
| 951 | BLOCK_INPUT; | 954 | BLOCK_INPUT; |
| 952 | selection = w32_dialog_show (f, 0, title, &error_name); | 955 | selection = w32_dialog_show (f, 0, title, header, &error_name); |
| 953 | UNBLOCK_INPUT; | 956 | UNBLOCK_INPUT; |
| 954 | 957 | ||
| 955 | discard_menu_items (); | 958 | discard_menu_items (); |
| @@ -1995,10 +1998,10 @@ static char * button_names [] = { | |||
| 1995 | "button6", "button7", "button8", "button9", "button10" }; | 1998 | "button6", "button7", "button8", "button9", "button10" }; |
| 1996 | 1999 | ||
| 1997 | static Lisp_Object | 2000 | static Lisp_Object |
| 1998 | w32_dialog_show (f, keymaps, title, error) | 2001 | w32_dialog_show (f, keymaps, title, header, error) |
| 1999 | FRAME_PTR f; | 2002 | FRAME_PTR f; |
| 2000 | int keymaps; | 2003 | int keymaps; |
| 2001 | Lisp_Object title; | 2004 | Lisp_Object title, header; |
| 2002 | char **error; | 2005 | char **error; |
| 2003 | { | 2006 | { |
| 2004 | int i, nb_buttons=0; | 2007 | int i, nb_buttons=0; |
| @@ -2099,11 +2102,17 @@ w32_dialog_show (f, keymaps, title, error) | |||
| 2099 | wv->name = dialog_name; | 2102 | wv->name = dialog_name; |
| 2100 | wv->help = Qnil; | 2103 | wv->help = Qnil; |
| 2101 | 2104 | ||
| 2105 | /* Frame title: 'Q' = Question, 'I' = Information. | ||
| 2106 | Can also have 'E' = Error if, one day, we want | ||
| 2107 | a popup for errors. */ | ||
| 2108 | if (NILP(header)) | ||
| 2109 | dialog_name[0] = 'Q'; | ||
| 2110 | else | ||
| 2111 | dialog_name[0] = 'I'; | ||
| 2112 | |||
| 2102 | /* Dialog boxes use a really stupid name encoding | 2113 | /* Dialog boxes use a really stupid name encoding |
| 2103 | which specifies how many buttons to use | 2114 | which specifies how many buttons to use |
| 2104 | and how many buttons are on the right. | 2115 | and how many buttons are on the right. */ |
| 2105 | The Q means something also. */ | ||
| 2106 | dialog_name[0] = 'Q'; | ||
| 2107 | dialog_name[1] = '0' + nb_buttons; | 2116 | dialog_name[1] = '0' + nb_buttons; |
| 2108 | dialog_name[2] = 'B'; | 2117 | dialog_name[2] = 'B'; |
| 2109 | dialog_name[3] = 'R'; | 2118 | dialog_name[3] = 'R'; |
diff --git a/src/window.c b/src/window.c index 67cbd73bc50..83d99cf67ba 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -546,7 +546,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 546 | + WINDOW_LEFT_FRINGE_COLS (w)), | 546 | + WINDOW_LEFT_FRINGE_COLS (w)), |
| 547 | make_number (WINDOW_TOP_EDGE_LINE (w) | 547 | make_number (WINDOW_TOP_EDGE_LINE (w) |
| 548 | + WINDOW_HEADER_LINE_LINES (w)), | 548 | + WINDOW_HEADER_LINE_LINES (w)), |
| 549 | make_number (WINDOW_RIGHT_EDGE_COL (w) | 549 | make_number (WINDOW_BOX_RIGHT_EDGE_COL (w) |
| 550 | - WINDOW_RIGHT_MARGIN_COLS (w) | 550 | - WINDOW_RIGHT_MARGIN_COLS (w) |
| 551 | - WINDOW_RIGHT_FRINGE_COLS (w)), | 551 | - WINDOW_RIGHT_FRINGE_COLS (w)), |
| 552 | make_number (WINDOW_BOTTOM_EDGE_LINE (w) | 552 | make_number (WINDOW_BOTTOM_EDGE_LINE (w) |
| @@ -570,7 +570,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 570 | + WINDOW_LEFT_FRINGE_WIDTH (w)), | 570 | + WINDOW_LEFT_FRINGE_WIDTH (w)), |
| 571 | make_number (WINDOW_TOP_EDGE_Y (w) | 571 | make_number (WINDOW_TOP_EDGE_Y (w) |
| 572 | + WINDOW_HEADER_LINE_HEIGHT (w)), | 572 | + WINDOW_HEADER_LINE_HEIGHT (w)), |
| 573 | make_number (WINDOW_RIGHT_EDGE_X (w) | 573 | make_number (WINDOW_BOX_RIGHT_EDGE_X (w) |
| 574 | - WINDOW_RIGHT_MARGIN_WIDTH (w) | 574 | - WINDOW_RIGHT_MARGIN_WIDTH (w) |
| 575 | - WINDOW_RIGHT_FRINGE_WIDTH (w)), | 575 | - WINDOW_RIGHT_FRINGE_WIDTH (w)), |
| 576 | make_number (WINDOW_BOTTOM_EDGE_Y (w) | 576 | make_number (WINDOW_BOTTOM_EDGE_Y (w) |
diff --git a/src/xdisp.c b/src/xdisp.c index 6bde1970bf3..fe2d2e7020a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -16041,7 +16041,12 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) | |||
| 16041 | && --limit > 0 | 16041 | && --limit > 0 |
| 16042 | && (precision <= 0 || n < precision)) | 16042 | && (precision <= 0 || n < precision)) |
| 16043 | { | 16043 | { |
| 16044 | n += display_mode_element (it, depth, field_width - n, | 16044 | n += display_mode_element (it, depth, |
| 16045 | /* Do padding only after the last | ||
| 16046 | element in the list. */ | ||
| 16047 | (! CONSP (XCDR (elt)) | ||
| 16048 | ? field_width - n | ||
| 16049 | : 0), | ||
| 16045 | precision - n, XCAR (elt), | 16050 | precision - n, XCAR (elt), |
| 16046 | props, risky); | 16051 | props, risky); |
| 16047 | elt = XCDR (elt); | 16052 | elt = XCDR (elt); |
| @@ -21238,11 +21243,12 @@ define_frame_cursor1 (f, cursor, pointer) | |||
| 21238 | position relative to the start of the mode line. */ | 21243 | position relative to the start of the mode line. */ |
| 21239 | 21244 | ||
| 21240 | static void | 21245 | static void |
| 21241 | note_mode_line_or_margin_highlight (w, x, y, area) | 21246 | note_mode_line_or_margin_highlight (window, x, y, area) |
| 21242 | struct window *w; | 21247 | Lisp_Object window; |
| 21243 | int x, y; | 21248 | int x, y; |
| 21244 | enum window_part area; | 21249 | enum window_part area; |
| 21245 | { | 21250 | { |
| 21251 | struct window *w = XWINDOW (window); | ||
| 21246 | struct frame *f = XFRAME (w->frame); | 21252 | struct frame *f = XFRAME (w->frame); |
| 21247 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 21253 | Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 21248 | Cursor cursor = FRAME_X_OUTPUT (f)->nontext_cursor; | 21254 | Cursor cursor = FRAME_X_OUTPUT (f)->nontext_cursor; |
| @@ -21251,9 +21257,38 @@ note_mode_line_or_margin_highlight (w, x, y, area) | |||
| 21251 | Lisp_Object string, object = Qnil; | 21257 | Lisp_Object string, object = Qnil; |
| 21252 | Lisp_Object pos, help; | 21258 | Lisp_Object pos, help; |
| 21253 | 21259 | ||
| 21260 | Lisp_Object mouse_face; | ||
| 21261 | int original_x_pixel = x; | ||
| 21262 | struct glyph * glyph = NULL; | ||
| 21263 | struct glyph_row *row; | ||
| 21264 | |||
| 21254 | if (area == ON_MODE_LINE || area == ON_HEADER_LINE) | 21265 | if (area == ON_MODE_LINE || area == ON_HEADER_LINE) |
| 21255 | string = mode_line_string (w, area, &x, &y, &charpos, | 21266 | { |
| 21256 | &object, &dx, &dy, &width, &height); | 21267 | int x0; |
| 21268 | struct glyph *end; | ||
| 21269 | |||
| 21270 | string = mode_line_string (w, area, &x, &y, &charpos, | ||
| 21271 | &object, &dx, &dy, &width, &height); | ||
| 21272 | |||
| 21273 | row = (area == ON_MODE_LINE | ||
| 21274 | ? MATRIX_MODE_LINE_ROW (w->current_matrix) | ||
| 21275 | : MATRIX_HEADER_LINE_ROW (w->current_matrix)); | ||
| 21276 | |||
| 21277 | /* Find glyph */ | ||
| 21278 | if (row->mode_line_p && row->enabled_p) | ||
| 21279 | { | ||
| 21280 | glyph = row->glyphs[TEXT_AREA]; | ||
| 21281 | end = glyph + row->used[TEXT_AREA]; | ||
| 21282 | |||
| 21283 | for (x0 = original_x_pixel; | ||
| 21284 | glyph < end && x0 >= glyph->pixel_width; | ||
| 21285 | ++glyph) | ||
| 21286 | x0 -= glyph->pixel_width; | ||
| 21287 | |||
| 21288 | if (glyph >= end) | ||
| 21289 | glyph = NULL; | ||
| 21290 | } | ||
| 21291 | } | ||
| 21257 | else | 21292 | else |
| 21258 | { | 21293 | { |
| 21259 | x -= WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w); | 21294 | x -= WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w); |
| @@ -21331,6 +21366,94 @@ note_mode_line_or_margin_highlight (w, x, y, area) | |||
| 21331 | if (!KEYMAPP (map)) | 21366 | if (!KEYMAPP (map)) |
| 21332 | cursor = dpyinfo->vertical_scroll_bar_cursor; | 21367 | cursor = dpyinfo->vertical_scroll_bar_cursor; |
| 21333 | } | 21368 | } |
| 21369 | |||
| 21370 | /* Change the mouse face according to what is under X/Y. */ | ||
| 21371 | mouse_face = Fget_text_property (pos, Qmouse_face, string); | ||
| 21372 | if (!NILP (mouse_face) | ||
| 21373 | && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE)) | ||
| 21374 | && glyph) | ||
| 21375 | { | ||
| 21376 | Lisp_Object b, e; | ||
| 21377 | |||
| 21378 | struct glyph * tmp_glyph; | ||
| 21379 | |||
| 21380 | int gpos; | ||
| 21381 | int gseq_length; | ||
| 21382 | int total_pixel_width; | ||
| 21383 | int ignore; | ||
| 21384 | |||
| 21385 | |||
| 21386 | if (clear_mouse_face (dpyinfo)) | ||
| 21387 | cursor = No_Cursor; | ||
| 21388 | |||
| 21389 | b = Fprevious_single_property_change (make_number (charpos + 1), | ||
| 21390 | Qmouse_face, string, Qnil); | ||
| 21391 | if (NILP (b)) | ||
| 21392 | b = make_number (0); | ||
| 21393 | |||
| 21394 | e = Fnext_single_property_change (pos, Qmouse_face, string, Qnil); | ||
| 21395 | if (NILP (e)) | ||
| 21396 | e = make_number (SCHARS (string)); | ||
| 21397 | |||
| 21398 | /* Calculate the position(glyph position: GPOS) of GLYPH in | ||
| 21399 | displayed string. GPOS is different from CHARPOS. | ||
| 21400 | |||
| 21401 | CHARPOS is the position of glyph in internal string | ||
| 21402 | object. A mode line string format has structures which | ||
| 21403 | is converted to a flatten by emacs lisp interpreter. | ||
| 21404 | The internal string is an element of the structures. | ||
| 21405 | The displayed string is the flatten string. */ | ||
| 21406 | for (tmp_glyph = glyph - 1, gpos = 0; | ||
| 21407 | tmp_glyph->charpos >= XINT (b); | ||
| 21408 | tmp_glyph--, gpos++) | ||
| 21409 | { | ||
| 21410 | if (tmp_glyph->object != glyph->object) | ||
| 21411 | break; | ||
| 21412 | } | ||
| 21413 | |||
| 21414 | /* Calculate the lenght(glyph sequence length: GSEQ_LENGTH) of | ||
| 21415 | displayed string holding GLYPH. | ||
| 21416 | |||
| 21417 | GSEQ_LENGTH is different from SCHARS (STRING). | ||
| 21418 | SCHARS (STRING) returns the length of the internal string. */ | ||
| 21419 | for (tmp_glyph = glyph, gseq_length = gpos; | ||
| 21420 | tmp_glyph->charpos < XINT (e); | ||
| 21421 | tmp_glyph++, gseq_length++) | ||
| 21422 | { | ||
| 21423 | if (tmp_glyph->object != glyph->object) | ||
| 21424 | break; | ||
| 21425 | } | ||
| 21426 | |||
| 21427 | total_pixel_width = 0; | ||
| 21428 | for (tmp_glyph = glyph - gpos; tmp_glyph != glyph; tmp_glyph++) | ||
| 21429 | total_pixel_width += tmp_glyph->pixel_width; | ||
| 21430 | |||
| 21431 | dpyinfo->mouse_face_beg_col = (x - gpos); | ||
| 21432 | dpyinfo->mouse_face_beg_row = (area == ON_MODE_LINE | ||
| 21433 | ? (w->current_matrix)->nrows - 1 | ||
| 21434 | : 0); | ||
| 21435 | |||
| 21436 | dpyinfo->mouse_face_beg_x = original_x_pixel - (total_pixel_width + dx); | ||
| 21437 | dpyinfo->mouse_face_beg_y = 0; | ||
| 21438 | |||
| 21439 | dpyinfo->mouse_face_end_col = (x - gpos) + gseq_length; | ||
| 21440 | dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_beg_row; | ||
| 21441 | |||
| 21442 | dpyinfo->mouse_face_end_x = 0; | ||
| 21443 | dpyinfo->mouse_face_end_y = 0; | ||
| 21444 | |||
| 21445 | dpyinfo->mouse_face_past_end = 0; | ||
| 21446 | dpyinfo->mouse_face_window = window; | ||
| 21447 | |||
| 21448 | dpyinfo->mouse_face_face_id = face_at_string_position (w, string, | ||
| 21449 | charpos, | ||
| 21450 | 0, 0, 0, &ignore, | ||
| 21451 | glyph->face_id, 1); | ||
| 21452 | show_mouse_face (dpyinfo, DRAW_MOUSE_FACE); | ||
| 21453 | |||
| 21454 | if (NILP (pointer)) | ||
| 21455 | pointer = Qhand; | ||
| 21456 | } | ||
| 21334 | } | 21457 | } |
| 21335 | 21458 | ||
| 21336 | define_frame_cursor1 (f, cursor, pointer); | 21459 | define_frame_cursor1 (f, cursor, pointer); |
| @@ -21411,7 +21534,7 @@ note_mouse_highlight (f, x, y) | |||
| 21411 | if (part == ON_MODE_LINE || part == ON_HEADER_LINE | 21534 | if (part == ON_MODE_LINE || part == ON_HEADER_LINE |
| 21412 | || part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN) | 21535 | || part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN) |
| 21413 | { | 21536 | { |
| 21414 | note_mode_line_or_margin_highlight (w, x, y, part); | 21537 | note_mode_line_or_margin_highlight (window, x, y, part); |
| 21415 | return; | 21538 | return; |
| 21416 | } | 21539 | } |
| 21417 | 21540 | ||
| @@ -21671,6 +21794,7 @@ note_mouse_highlight (f, x, y) | |||
| 21671 | b = make_number (0); | 21794 | b = make_number (0); |
| 21672 | if (NILP (e)) | 21795 | if (NILP (e)) |
| 21673 | e = make_number (SCHARS (object) - 1); | 21796 | e = make_number (SCHARS (object) - 1); |
| 21797 | |||
| 21674 | fast_find_string_pos (w, XINT (b), object, | 21798 | fast_find_string_pos (w, XINT (b), object, |
| 21675 | &dpyinfo->mouse_face_beg_col, | 21799 | &dpyinfo->mouse_face_beg_col, |
| 21676 | &dpyinfo->mouse_face_beg_row, | 21800 | &dpyinfo->mouse_face_beg_row, |
diff --git a/src/xmenu.c b/src/xmenu.c index 931d2a87904..6e46accbe8d 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -116,7 +116,8 @@ extern Lisp_Object Qmenu_bar_update_hook; | |||
| 116 | extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); | 116 | extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); |
| 117 | extern XtAppContext Xt_app_con; | 117 | extern XtAppContext Xt_app_con; |
| 118 | 118 | ||
| 119 | static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); | 119 | static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object, |
| 120 | char **)); | ||
| 120 | static void popup_get_selection P_ ((XEvent *, struct x_display_info *, | 121 | static void popup_get_selection P_ ((XEvent *, struct x_display_info *, |
| 121 | LWLIB_ID, int)); | 122 | LWLIB_ID, int)); |
| 122 | 123 | ||
| @@ -129,7 +130,8 @@ static void popup_get_selection P_ ((XEvent *, struct x_display_info *, | |||
| 129 | #include "gtkutil.h" | 130 | #include "gtkutil.h" |
| 130 | #define HAVE_BOXES 1 | 131 | #define HAVE_BOXES 1 |
| 131 | extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); | 132 | extern void set_frame_menubar P_ ((FRAME_PTR, int, int)); |
| 132 | static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); | 133 | static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object, |
| 134 | char **)); | ||
| 133 | #endif | 135 | #endif |
| 134 | 136 | ||
| 135 | /* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU | 137 | /* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU |
| @@ -999,7 +1001,7 @@ no quit occurs and `x-popup-menu' returns nil. */) | |||
| 999 | 1001 | ||
| 1000 | #ifdef HAVE_MENUS | 1002 | #ifdef HAVE_MENUS |
| 1001 | 1003 | ||
| 1002 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0, | 1004 | DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, |
| 1003 | doc: /* Pop up a dialog box and return user's selection. | 1005 | doc: /* Pop up a dialog box and return user's selection. |
| 1004 | POSITION specifies which frame to use. | 1006 | POSITION specifies which frame to use. |
| 1005 | This is normally a mouse button event or a window or frame. | 1007 | This is normally a mouse button event or a window or frame. |
| @@ -1007,7 +1009,7 @@ If POSITION is t, it means to use the frame the mouse is on. | |||
| 1007 | The dialog box appears in the middle of the specified frame. | 1009 | The dialog box appears in the middle of the specified frame. |
| 1008 | 1010 | ||
| 1009 | CONTENTS specifies the alternatives to display in the dialog box. | 1011 | CONTENTS specifies the alternatives to display in the dialog box. |
| 1010 | It is a list of the form (TITLE ITEM1 ITEM2...). | 1012 | It is a list of the form (DIALOG ITEM1 ITEM2...). |
| 1011 | Each ITEM is a cons cell (STRING . VALUE). | 1013 | Each ITEM is a cons cell (STRING . VALUE). |
| 1012 | The return value is VALUE from the chosen item. | 1014 | The return value is VALUE from the chosen item. |
| 1013 | 1015 | ||
| @@ -1016,11 +1018,14 @@ An ITEM may also be nil--that means to put all preceding items | |||
| 1016 | on the left of the dialog box and all following items on the right. | 1018 | on the left of the dialog box and all following items on the right. |
| 1017 | \(By default, approximately half appear on each side.) | 1019 | \(By default, approximately half appear on each side.) |
| 1018 | 1020 | ||
| 1021 | If HEADER is non-nil, the frame title for the box is "Information", | ||
| 1022 | otherwise it is "Question". | ||
| 1023 | |||
| 1019 | If the user gets rid of the dialog box without making a valid choice, | 1024 | If the user gets rid of the dialog box without making a valid choice, |
| 1020 | for instance using the window manager, then this produces a quit and | 1025 | for instance using the window manager, then this produces a quit and |
| 1021 | `x-popup-dialog' does not return. */) | 1026 | `x-popup-dialog' does not return. */) |
| 1022 | (position, contents) | 1027 | (position, contents, header) |
| 1023 | Lisp_Object position, contents; | 1028 | Lisp_Object position, contents, header; |
| 1024 | { | 1029 | { |
| 1025 | FRAME_PTR f = NULL; | 1030 | FRAME_PTR f = NULL; |
| 1026 | Lisp_Object window; | 1031 | Lisp_Object window; |
| @@ -1115,7 +1120,7 @@ for instance using the window manager, then this produces a quit and | |||
| 1115 | 1120 | ||
| 1116 | /* Display them in a dialog box. */ | 1121 | /* Display them in a dialog box. */ |
| 1117 | BLOCK_INPUT; | 1122 | BLOCK_INPUT; |
| 1118 | selection = xdialog_show (f, 0, title, &error_name); | 1123 | selection = xdialog_show (f, 0, title, header, &error_name); |
| 1119 | UNBLOCK_INPUT; | 1124 | UNBLOCK_INPUT; |
| 1120 | 1125 | ||
| 1121 | unbind_to (specpdl_count, Qnil); | 1126 | unbind_to (specpdl_count, Qnil); |
| @@ -3020,11 +3025,11 @@ static char * button_names [] = { | |||
| 3020 | "button6", "button7", "button8", "button9", "button10" }; | 3025 | "button6", "button7", "button8", "button9", "button10" }; |
| 3021 | 3026 | ||
| 3022 | static Lisp_Object | 3027 | static Lisp_Object |
| 3023 | xdialog_show (f, keymaps, title, error) | 3028 | xdialog_show (f, keymaps, title, header, error_name) |
| 3024 | FRAME_PTR f; | 3029 | FRAME_PTR f; |
| 3025 | int keymaps; | 3030 | int keymaps; |
| 3026 | Lisp_Object title; | 3031 | Lisp_Object title, header; |
| 3027 | char **error; | 3032 | char **error_name; |
| 3028 | { | 3033 | { |
| 3029 | int i, nb_buttons=0; | 3034 | int i, nb_buttons=0; |
| 3030 | char dialog_name[6]; | 3035 | char dialog_name[6]; |
| @@ -3036,11 +3041,11 @@ xdialog_show (f, keymaps, title, error) | |||
| 3036 | /* 1 means we've seen the boundary between left-hand elts and right-hand. */ | 3041 | /* 1 means we've seen the boundary between left-hand elts and right-hand. */ |
| 3037 | int boundary_seen = 0; | 3042 | int boundary_seen = 0; |
| 3038 | 3043 | ||
| 3039 | *error = NULL; | 3044 | *error_name = NULL; |
| 3040 | 3045 | ||
| 3041 | if (menu_items_n_panes > 1) | 3046 | if (menu_items_n_panes > 1) |
| 3042 | { | 3047 | { |
| 3043 | *error = "Multiple panes in dialog box"; | 3048 | *error_name = "Multiple panes in dialog box"; |
| 3044 | return Qnil; | 3049 | return Qnil; |
| 3045 | } | 3050 | } |
| 3046 | 3051 | ||
| @@ -3077,7 +3082,7 @@ xdialog_show (f, keymaps, title, error) | |||
| 3077 | if (NILP (item_name)) | 3082 | if (NILP (item_name)) |
| 3078 | { | 3083 | { |
| 3079 | free_menubar_widget_value_tree (first_wv); | 3084 | free_menubar_widget_value_tree (first_wv); |
| 3080 | *error = "Submenu in dialog items"; | 3085 | *error_name = "Submenu in dialog items"; |
| 3081 | return Qnil; | 3086 | return Qnil; |
| 3082 | } | 3087 | } |
| 3083 | if (EQ (item_name, Qquote)) | 3088 | if (EQ (item_name, Qquote)) |
| @@ -3091,7 +3096,7 @@ xdialog_show (f, keymaps, title, error) | |||
| 3091 | if (nb_buttons >= 9) | 3096 | if (nb_buttons >= 9) |
| 3092 | { | 3097 | { |
| 3093 | free_menubar_widget_value_tree (first_wv); | 3098 | free_menubar_widget_value_tree (first_wv); |
| 3094 | *error = "Too many dialog items"; | 3099 | *error_name = "Too many dialog items"; |
| 3095 | return Qnil; | 3100 | return Qnil; |
| 3096 | } | 3101 | } |
| 3097 | 3102 | ||
| @@ -3121,11 +3126,18 @@ xdialog_show (f, keymaps, title, error) | |||
| 3121 | wv = xmalloc_widget_value (); | 3126 | wv = xmalloc_widget_value (); |
| 3122 | wv->name = dialog_name; | 3127 | wv->name = dialog_name; |
| 3123 | wv->help = Qnil; | 3128 | wv->help = Qnil; |
| 3129 | |||
| 3130 | /* Frame title: 'Q' = Question, 'I' = Information. | ||
| 3131 | Can also have 'E' = Error if, one day, we want | ||
| 3132 | a popup for errors. */ | ||
| 3133 | if (NILP(header)) | ||
| 3134 | dialog_name[0] = 'Q'; | ||
| 3135 | else | ||
| 3136 | dialog_name[0] = 'I'; | ||
| 3137 | |||
| 3124 | /* Dialog boxes use a really stupid name encoding | 3138 | /* Dialog boxes use a really stupid name encoding |
| 3125 | which specifies how many buttons to use | 3139 | which specifies how many buttons to use |
| 3126 | and how many buttons are on the right. | 3140 | and how many buttons are on the right. */ |
| 3127 | The Q means something also. */ | ||
| 3128 | dialog_name[0] = 'Q'; | ||
| 3129 | dialog_name[1] = '0' + nb_buttons; | 3141 | dialog_name[1] = '0' + nb_buttons; |
| 3130 | dialog_name[2] = 'B'; | 3142 | dialog_name[2] = 'B'; |
| 3131 | dialog_name[3] = 'R'; | 3143 | dialog_name[3] = 'R'; |
diff --git a/src/xterm.c b/src/xterm.c index aa5f9829105..c24802bab6b 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -915,6 +915,7 @@ x_encode_char (c, char2b, font_info, two_byte_p) | |||
| 915 | /* It's a program. */ | 915 | /* It's a program. */ |
| 916 | struct ccl_program *ccl = font_info->font_encoder; | 916 | struct ccl_program *ccl = font_info->font_encoder; |
| 917 | 917 | ||
| 918 | check_ccl_update (ccl); | ||
| 918 | if (CHARSET_DIMENSION (charset) == 1) | 919 | if (CHARSET_DIMENSION (charset) == 1) |
| 919 | { | 920 | { |
| 920 | ccl->reg[0] = charset; | 921 | ccl->reg[0] = charset; |