diff options
| author | Karoly Lorentey | 2004-09-10 13:06:10 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-09-10 13:06:10 +0000 |
| commit | fd15a4daca3b32487b751006a5e7be7732fdf9ea (patch) | |
| tree | b53e804e340b981462b1cba73be9a1ccd8667f0e /src | |
| parent | d8d26438090eae0b8f518ad740ab4b821efdf540 (diff) | |
| parent | cbd5542a3ccf044c601318f288d9b022f53b1de2 (diff) | |
| download | emacs-fd15a4daca3b32487b751006a5e7be7732fdf9ea.tar.gz emacs-fd15a4daca3b32487b751006a5e7be7732fdf9ea.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-529
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-530
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-531
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-532
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-533
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-534
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-535
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-536
sync-tree with gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--devo--0--patch-2
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.8--base-0
Import from Gnus CVS branch V5-8
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-1
{arch}/=tagging-method: Add CVS and autoconf grot to junk regexp
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-2
Use explicit tags for autoconf input files
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-3
Remove RCS keywords
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-4
Fix copied explicit id-tags
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-5
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.8--patch-6
configure.in: Use ifelse instead of m4_if for arch-tag: comment
* miles@gnu.org--gnu-2004/gnus--rel--5.10--base-0
tag of miles@gnu.org--gnu-2004/gnus--rel--5.8--base-0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-1
Gnus 5.10, from CVS branch v5-10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-2
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-3
Use explicit tags for autoconf input files
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-4
sync-tree with gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-5
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-6
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-7
Remove RCS keywords
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-8
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-9
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-10
Add {arch}/=cvs-sync-make-log
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-11
Merge from gnus--rel--5.8
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-12
Update from CVS: make.bat: Fix line endings around arch-tag.
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-13
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-14
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-15
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-16
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-17
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-242
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 73 | ||||
| -rw-r--r-- | src/buffer.c | 10 | ||||
| -rw-r--r-- | src/buffer.h | 3 | ||||
| -rw-r--r-- | src/fileio.c | 14 | ||||
| -rw-r--r-- | src/minibuf.c | 11 | ||||
| -rw-r--r-- | src/w32fns.c | 32 | ||||
| -rw-r--r-- | src/w32menu.c | 5 | ||||
| -rw-r--r-- | src/w32term.h | 5 | ||||
| -rw-r--r-- | src/window.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 48 | ||||
| -rw-r--r-- | src/xmenu.c | 8 |
11 files changed, 161 insertions, 52 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8fd72a29c29..bdc2d2d7e20 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,6 +1,57 @@ | |||
| 1 | 2004-09-09 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (decode_mode_spec): Use current buffer for most purposes. | ||
| 4 | |||
| 5 | 2004-09-08 Richard M. Stallman <rms@gnu.org> | ||
| 6 | |||
| 7 | * window.c (Fset_window_buffer): Doc fix. | ||
| 8 | |||
| 9 | * xdisp.c (Fformat_mode_line): New arg BUFFER says which buffer to use. | ||
| 10 | |||
| 11 | 2004-09-08 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 12 | |||
| 13 | * minibuf.c (history_delete_duplicates): New variable. | ||
| 14 | (read_minibuf): Use it. | ||
| 15 | (syms_of_minibuf): Create the corresponding lisp variable. | ||
| 16 | |||
| 17 | 2004-09-08 Kim F. Storm <storm@cua.dk> | ||
| 18 | |||
| 19 | * xdisp.c (set_cursor_from_row): Also look at 'cursor' property in | ||
| 20 | overlay just before point. | ||
| 21 | |||
| 22 | 2004-09-07 Luc Teirlinck <teirllm@auburn.edu> | ||
| 23 | |||
| 24 | * buffer.h (struct buffer): Add auto_save_file_format field. | ||
| 25 | * buffer.c (reset_buffer, init_buffer_once): Handle | ||
| 26 | auto_save_file_format field. | ||
| 27 | (syms_of_buffer): Add DEFVAR_PER_BUFFER for | ||
| 28 | `buffer-auto-save-file-format'. | ||
| 29 | * fileio.c: Delete declaration for removed Vauto_save_file_format. | ||
| 30 | (build_annotations): Adapt to replacement of | ||
| 31 | `auto-save-file-format' with the new buffer-local variable | ||
| 32 | `buffer-auto-save-file-format'. | ||
| 33 | (syms_of_fileio): Delete DEFVAR_LISP for auto-save-file-format. | ||
| 34 | |||
| 35 | 2004-09-07 Jason Rumney <jasonr@gnu.org> | ||
| 36 | |||
| 37 | * w32term.h (AppendMenuW_Proc): Move declaration from w32menu.c. | ||
| 38 | |||
| 39 | * w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]: Handle | ||
| 40 | Unicode menu titles. | ||
| 41 | |||
| 42 | 2004-09-07 Kim F. Storm <storm@cua.dk> | ||
| 43 | |||
| 44 | * xdisp.c (set_cursor_from_row): Fix last change. Only use 'cursor' | ||
| 45 | property from text property or overlay strings at point. | ||
| 46 | |||
| 47 | 2004-09-07 Stefan <monnier@iro.umontreal.ca> | ||
| 48 | |||
| 49 | * xmenu.c (update_submenu_strings): YAILOM. | ||
| 50 | (set_frame_menubar): Make sure last_i is initialized. | ||
| 51 | |||
| 1 | 2004-09-03 Jason Rumney <jasonr@gnu.org> | 52 | 2004-09-03 Jason Rumney <jasonr@gnu.org> |
| 2 | 53 | ||
| 3 | * w32menu.c (_widget_value): Added lname and lkey. | 54 | * w32menu.c (_widget_value): Add lname and lkey. |
| 4 | (digest_single_submenu): Set lname and lkey in widget_value | 55 | (digest_single_submenu): Set lname and lkey in widget_value |
| 5 | instead of name and key. | 56 | instead of name and key. |
| 6 | (update_submenu_strings): New function. | 57 | (update_submenu_strings): New function. |
| @@ -12,7 +63,7 @@ | |||
| 12 | UTF-8 if Unicode API is available. | 63 | UTF-8 if Unicode API is available. |
| 13 | (utf8to16): New function. | 64 | (utf8to16): New function. |
| 14 | (add_menu_item): Use it when calling Unicode API. | 65 | (add_menu_item): Use it when calling Unicode API. |
| 15 | 66 | ||
| 16 | 2004-09-03 Kim F. Storm <storm@cua.dk> | 67 | 2004-09-03 Kim F. Storm <storm@cua.dk> |
| 17 | 68 | ||
| 18 | * xdisp.c (set_cursor_from_row): Look for non-nil `cursor' property | 69 | * xdisp.c (set_cursor_from_row): Look for non-nil `cursor' property |
| @@ -22,14 +73,14 @@ | |||
| 22 | 2004-09-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 73 | 2004-09-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 23 | 74 | ||
| 24 | * macfns.c (x_real_positions): Save the current window port and | 75 | * macfns.c (x_real_positions): Save the current window port and |
| 25 | set a new one before obtaining the global coordinate. Use | 76 | set a new one before obtaining the global coordinate. |
| 26 | FRAME_MAC_WINDOW. | 77 | Use FRAME_MAC_WINDOW. |
| 27 | (x_set_name, x_set_title): Encode title to UTF8. Use | 78 | (x_set_name, x_set_title): Encode title to UTF8. |
| 28 | SetWindowTitleWithCFString. | 79 | Use SetWindowTitleWithCFString. |
| 29 | (Fx_server_version): Get correct OS version. | 80 | (Fx_server_version): Get correct OS version. |
| 30 | 81 | ||
| 31 | * macmenu.c (add_menu_item): Remove unused variable `i'. Don't | 82 | * macmenu.c (add_menu_item): Remove unused variable `i'. |
| 32 | let separator items destroy refence constants of other menu items. | 83 | Don't let separator items destroy refence constants of other menu items. |
| 33 | 84 | ||
| 34 | * macterm.c (x_update_end): Move SetPortWindowPort to inside | 85 | * macterm.c (x_update_end): Move SetPortWindowPort to inside |
| 35 | BLOCK_INPUT. | 86 | BLOCK_INPUT. |
| @@ -40,8 +91,8 @@ | |||
| 40 | 91 | ||
| 41 | * s/darwin.h (LIBS_CARBON): New define to specify libraries for | 92 | * s/darwin.h (LIBS_CARBON): New define to specify libraries for |
| 42 | Carbon support. | 93 | Carbon support. |
| 43 | (LD_SWITCH_SYSTEM_TEMACS): Don't link with unused libstdc++. Use | 94 | (LD_SWITCH_SYSTEM_TEMACS): Don't link with unused libstdc++. |
| 44 | LIBS_CARBON. | 95 | Use LIBS_CARBON. |
| 45 | 96 | ||
| 46 | 2004-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 97 | 2004-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 47 | 98 | ||
| @@ -56,7 +107,7 @@ | |||
| 56 | 107 | ||
| 57 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 108 | 2004-08-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 58 | 109 | ||
| 59 | * macmenu.c (_widget_value): Added lname and lkey. | 110 | * macmenu.c (_widget_value): Add lname and lkey. |
| 60 | (single_submenu): Set lname and lkey in widget_value | 111 | (single_submenu): Set lname and lkey in widget_value |
| 61 | instead of name and key. | 112 | instead of name and key. |
| 62 | (update_submenu_strings): New function. | 113 | (update_submenu_strings): New function. |
diff --git a/src/buffer.c b/src/buffer.c index bade501b1a7..c70831e155f 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -694,6 +694,7 @@ reset_buffer (b) | |||
| 694 | b->mark_active = Qnil; | 694 | b->mark_active = Qnil; |
| 695 | b->point_before_scroll = Qnil; | 695 | b->point_before_scroll = Qnil; |
| 696 | b->file_format = Qnil; | 696 | b->file_format = Qnil; |
| 697 | b->auto_save_file_format = Qt; | ||
| 697 | b->last_selected_window = Qnil; | 698 | b->last_selected_window = Qnil; |
| 698 | XSETINT (b->display_count, 0); | 699 | XSETINT (b->display_count, 0); |
| 699 | b->display_time = Qnil; | 700 | b->display_time = Qnil; |
| @@ -4962,6 +4963,7 @@ init_buffer_once () | |||
| 4962 | buffer_defaults.undo_list = Qnil; | 4963 | buffer_defaults.undo_list = Qnil; |
| 4963 | buffer_defaults.mark_active = Qnil; | 4964 | buffer_defaults.mark_active = Qnil; |
| 4964 | buffer_defaults.file_format = Qnil; | 4965 | buffer_defaults.file_format = Qnil; |
| 4966 | buffer_defaults.auto_save_file_format = Qt; | ||
| 4965 | buffer_defaults.overlays_before = NULL; | 4967 | buffer_defaults.overlays_before = NULL; |
| 4966 | buffer_defaults.overlays_after = NULL; | 4968 | buffer_defaults.overlays_after = NULL; |
| 4967 | buffer_defaults.overlay_center = BEG; | 4969 | buffer_defaults.overlay_center = BEG; |
| @@ -5020,6 +5022,7 @@ init_buffer_once () | |||
| 5020 | XSETINT (buffer_local_flags.file_truename, -1); | 5022 | XSETINT (buffer_local_flags.file_truename, -1); |
| 5021 | XSETINT (buffer_local_flags.invisibility_spec, -1); | 5023 | XSETINT (buffer_local_flags.invisibility_spec, -1); |
| 5022 | XSETINT (buffer_local_flags.file_format, -1); | 5024 | XSETINT (buffer_local_flags.file_format, -1); |
| 5025 | XSETINT (buffer_local_flags.auto_save_file_format, -1); | ||
| 5023 | XSETINT (buffer_local_flags.display_count, -1); | 5026 | XSETINT (buffer_local_flags.display_count, -1); |
| 5024 | XSETINT (buffer_local_flags.display_time, -1); | 5027 | XSETINT (buffer_local_flags.display_time, -1); |
| 5025 | XSETINT (buffer_local_flags.enable_multibyte_characters, -1); | 5028 | XSETINT (buffer_local_flags.enable_multibyte_characters, -1); |
| @@ -5830,6 +5833,13 @@ functions; it should only affect their performance. */); | |||
| 5830 | Formats are defined by `format-alist'. This variable is | 5833 | Formats are defined by `format-alist'. This variable is |
| 5831 | set when a file is visited. */); | 5834 | set when a file is visited. */); |
| 5832 | 5835 | ||
| 5836 | DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", | ||
| 5837 | ¤t_buffer->auto_save_file_format, Qnil, | ||
| 5838 | doc: /* *Format in which to write auto-save files. | ||
| 5839 | Should be a list of symbols naming formats that are defined in `format-alist'. | ||
| 5840 | If it is t, which is the default, auto-save files are written in the | ||
| 5841 | same format as a regular save would use. */); | ||
| 5842 | |||
| 5833 | DEFVAR_PER_BUFFER ("buffer-invisibility-spec", | 5843 | DEFVAR_PER_BUFFER ("buffer-invisibility-spec", |
| 5834 | ¤t_buffer->invisibility_spec, Qnil, | 5844 | ¤t_buffer->invisibility_spec, Qnil, |
| 5835 | doc: /* Invisibility spec of this buffer. | 5845 | doc: /* Invisibility spec of this buffer. |
diff --git a/src/buffer.h b/src/buffer.h index e59211d4111..bcb293a2e85 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -666,6 +666,9 @@ struct buffer | |||
| 666 | /* List of symbols naming the file format used for visited file. */ | 666 | /* List of symbols naming the file format used for visited file. */ |
| 667 | Lisp_Object file_format; | 667 | Lisp_Object file_format; |
| 668 | 668 | ||
| 669 | /* List of symbols naming the file format used for auto-save file. */ | ||
| 670 | Lisp_Object auto_save_file_format; | ||
| 671 | |||
| 669 | /* True if the newline position cache and width run cache are | 672 | /* True if the newline position cache and width run cache are |
| 670 | enabled. See search.c and indent.c. */ | 673 | enabled. See search.c and indent.c. */ |
| 671 | Lisp_Object cache_long_line_scans; | 674 | Lisp_Object cache_long_line_scans; |
diff --git a/src/fileio.c b/src/fileio.c index 707b6e96d86..e95205d7489 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -175,9 +175,6 @@ Lisp_Object Vdefault_file_name_coding_system; | |||
| 175 | whose I/O is done with a special handler. */ | 175 | whose I/O is done with a special handler. */ |
| 176 | Lisp_Object Vfile_name_handler_alist; | 176 | Lisp_Object Vfile_name_handler_alist; |
| 177 | 177 | ||
| 178 | /* Format for auto-save files */ | ||
| 179 | Lisp_Object Vauto_save_file_format; | ||
| 180 | |||
| 181 | /* Lisp functions for translating file formats */ | 178 | /* Lisp functions for translating file formats */ |
| 182 | Lisp_Object Qformat_decode, Qformat_annotate_function; | 179 | Lisp_Object Qformat_decode, Qformat_annotate_function; |
| 183 | 180 | ||
| @@ -5374,8 +5371,8 @@ build_annotations (start, end) | |||
| 5374 | } | 5371 | } |
| 5375 | 5372 | ||
| 5376 | /* Now do the same for annotation functions implied by the file-format */ | 5373 | /* Now do the same for annotation functions implied by the file-format */ |
| 5377 | if (auto_saving && (!EQ (Vauto_save_file_format, Qt))) | 5374 | if (auto_saving && (!EQ (current_buffer->auto_save_file_format, Qt))) |
| 5378 | p = Vauto_save_file_format; | 5375 | p = current_buffer->auto_save_file_format; |
| 5379 | else | 5376 | else |
| 5380 | p = current_buffer->file_format; | 5377 | p = current_buffer->file_format; |
| 5381 | for (i = 0; CONSP (p); p = XCDR (p), ++i) | 5378 | for (i = 0; CONSP (p); p = XCDR (p), ++i) |
| @@ -6493,13 +6490,6 @@ instead use `file-name-coding-system' to get a constant encoding | |||
| 6493 | of file names regardless of the current language environment. */); | 6490 | of file names regardless of the current language environment. */); |
| 6494 | Vdefault_file_name_coding_system = Qnil; | 6491 | Vdefault_file_name_coding_system = Qnil; |
| 6495 | 6492 | ||
| 6496 | DEFVAR_LISP ("auto-save-file-format", &Vauto_save_file_format, | ||
| 6497 | doc: /* *Format in which to write auto-save files. | ||
| 6498 | Should be a list of symbols naming formats that are defined in `format-alist'. | ||
| 6499 | If it is t, which is the default, auto-save files are written in the | ||
| 6500 | same format as a regular save would use. */); | ||
| 6501 | Vauto_save_file_format = Qt; | ||
| 6502 | |||
| 6503 | Qformat_decode = intern ("format-decode"); | 6493 | Qformat_decode = intern ("format-decode"); |
| 6504 | staticpro (&Qformat_decode); | 6494 | staticpro (&Qformat_decode); |
| 6505 | Qformat_annotate_function = intern ("format-annotate-function"); | 6495 | Qformat_annotate_function = intern ("format-annotate-function"); |
diff --git a/src/minibuf.c b/src/minibuf.c index 3d2c6c3a475..a569daaefee 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -62,6 +62,10 @@ Lisp_Object Vcompletion_auto_help; | |||
| 62 | 62 | ||
| 63 | Lisp_Object Qhistory_length, Vhistory_length; | 63 | Lisp_Object Qhistory_length, Vhistory_length; |
| 64 | 64 | ||
| 65 | /* No duplicates in history. */ | ||
| 66 | |||
| 67 | int history_delete_duplicates; | ||
| 68 | |||
| 65 | /* Fread_minibuffer leaves the input here as a string. */ | 69 | /* Fread_minibuffer leaves the input here as a string. */ |
| 66 | 70 | ||
| 67 | Lisp_Object last_minibuf_string; | 71 | Lisp_Object last_minibuf_string; |
| @@ -754,6 +758,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 754 | { | 758 | { |
| 755 | Lisp_Object length; | 759 | Lisp_Object length; |
| 756 | 760 | ||
| 761 | if (history_delete_duplicates) Fdelete (histstring, histval); | ||
| 757 | histval = Fcons (histstring, histval); | 762 | histval = Fcons (histstring, histval); |
| 758 | Fset (Vminibuffer_history_variable, histval); | 763 | Fset (Vminibuffer_history_variable, histval); |
| 759 | 764 | ||
| @@ -2673,6 +2678,12 @@ just after a new element is inserted. Setting the history-length | |||
| 2673 | property of a history variable overrides this default. */); | 2678 | property of a history variable overrides this default. */); |
| 2674 | XSETFASTINT (Vhistory_length, 30); | 2679 | XSETFASTINT (Vhistory_length, 30); |
| 2675 | 2680 | ||
| 2681 | DEFVAR_BOOL ("history-delete-duplicates", &history_delete_duplicates, | ||
| 2682 | doc: /* *Non-nil means to delete duplicates in history. | ||
| 2683 | If set to t when adding a new history element, all previous identical | ||
| 2684 | elements are deleted. */); | ||
| 2685 | history_delete_duplicates = 0; | ||
| 2686 | |||
| 2676 | DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help, | 2687 | DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help, |
| 2677 | doc: /* *Non-nil means automatically provide help for invalid completion input. */); | 2688 | doc: /* *Non-nil means automatically provide help for invalid completion input. */); |
| 2678 | Vcompletion_auto_help = Qt; | 2689 | Vcompletion_auto_help = Qt; |
diff --git a/src/w32fns.c b/src/w32fns.c index e60385c8129..5cfc4adb0af 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -260,6 +260,7 @@ typedef BOOL (WINAPI * TrackMouseEvent_Proc) | |||
| 260 | 260 | ||
| 261 | TrackMouseEvent_Proc track_mouse_event_fn = NULL; | 261 | TrackMouseEvent_Proc track_mouse_event_fn = NULL; |
| 262 | ClipboardSequence_Proc clipboard_sequence_fn = NULL; | 262 | ClipboardSequence_Proc clipboard_sequence_fn = NULL; |
| 263 | extern AppendMenuW_Proc unicode_append_menu; | ||
| 263 | 264 | ||
| 264 | /* W95 mousewheel handler */ | 265 | /* W95 mousewheel handler */ |
| 265 | unsigned int msh_mousewheel = 0; | 266 | unsigned int msh_mousewheel = 0; |
| @@ -3457,7 +3458,13 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3457 | pMis->itemHeight = GetSystemMetrics (SM_CYMENUSIZE); | 3458 | pMis->itemHeight = GetSystemMetrics (SM_CYMENUSIZE); |
| 3458 | if (title) | 3459 | if (title) |
| 3459 | { | 3460 | { |
| 3460 | GetTextExtentPoint32 (hdc, title, strlen (title), &size); | 3461 | if (unicode_append_menu) |
| 3462 | GetTextExtentPoint32W (hdc, (WCHAR *) title, | ||
| 3463 | wcslen ((WCHAR *) title), | ||
| 3464 | &size); | ||
| 3465 | else | ||
| 3466 | GetTextExtentPoint32 (hdc, title, strlen (title), &size); | ||
| 3467 | |||
| 3461 | pMis->itemWidth = size.cx; | 3468 | pMis->itemWidth = size.cx; |
| 3462 | if (pMis->itemHeight < size.cy) | 3469 | if (pMis->itemHeight < size.cy) |
| 3463 | pMis->itemHeight = size.cy; | 3470 | pMis->itemHeight = size.cy; |
| @@ -3495,13 +3502,22 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 3495 | menu_font = CreateFontIndirect (&menu_logfont); | 3502 | menu_font = CreateFontIndirect (&menu_logfont); |
| 3496 | old_font = SelectObject (hdc, menu_font); | 3503 | old_font = SelectObject (hdc, menu_font); |
| 3497 | 3504 | ||
| 3498 | /* Always draw title as if not selected. */ | 3505 | /* Always draw title as if not selected. */ |
| 3499 | ExtTextOut (hdc, | 3506 | if (unicode_append_menu) |
| 3500 | pDis->rcItem.left | 3507 | ExtTextOutW (hdc, |
| 3501 | + GetSystemMetrics (SM_CXMENUCHECK), | 3508 | pDis->rcItem.left |
| 3502 | pDis->rcItem.top, | 3509 | + GetSystemMetrics (SM_CXMENUCHECK), |
| 3503 | ETO_OPAQUE, &pDis->rcItem, | 3510 | pDis->rcItem.top, |
| 3504 | title, strlen (title), NULL); | 3511 | ETO_OPAQUE, &pDis->rcItem, |
| 3512 | (WCHAR *) title, | ||
| 3513 | wcslen ((WCHAR *) title), NULL); | ||
| 3514 | else | ||
| 3515 | ExtTextOut (hdc, | ||
| 3516 | pDis->rcItem.left | ||
| 3517 | + GetSystemMetrics (SM_CXMENUCHECK), | ||
| 3518 | pDis->rcItem.top, | ||
| 3519 | ETO_OPAQUE, &pDis->rcItem, | ||
| 3520 | title, strlen (title), NULL); | ||
| 3505 | 3521 | ||
| 3506 | SelectObject (hdc, old_font); | 3522 | SelectObject (hdc, old_font); |
| 3507 | DeleteObject (menu_font); | 3523 | DeleteObject (menu_font); |
diff --git a/src/w32menu.c b/src/w32menu.c index f3f3eb785b0..4553895d829 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -143,11 +143,6 @@ typedef BOOL (WINAPI * SetMenuItemInfoA_Proc) ( | |||
| 143 | IN UINT, | 143 | IN UINT, |
| 144 | IN BOOL, | 144 | IN BOOL, |
| 145 | IN LPCMENUITEMINFOA); | 145 | IN LPCMENUITEMINFOA); |
| 146 | typedef BOOL (WINAPI * AppendMenuW_Proc) ( | ||
| 147 | IN HMENU, | ||
| 148 | IN UINT, | ||
| 149 | IN UINT_PTR, | ||
| 150 | IN LPCWSTR); | ||
| 151 | 146 | ||
| 152 | GetMenuItemInfoA_Proc get_menu_item_info = NULL; | 147 | GetMenuItemInfoA_Proc get_menu_item_info = NULL; |
| 153 | SetMenuItemInfoA_Proc set_menu_item_info = NULL; | 148 | SetMenuItemInfoA_Proc set_menu_item_info = NULL; |
diff --git a/src/w32term.h b/src/w32term.h index 284458d4270..ca843ddbfb2 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -736,6 +736,11 @@ EXFUN (Fx_display_grayscale_p, 1); | |||
| 736 | ? BDF_1D_FONT : BDF_2D_FONT)) | 736 | ? BDF_1D_FONT : BDF_2D_FONT)) |
| 737 | 737 | ||
| 738 | typedef DWORD (WINAPI * ClipboardSequence_Proc) (); | 738 | typedef DWORD (WINAPI * ClipboardSequence_Proc) (); |
| 739 | typedef BOOL (WINAPI * AppendMenuW_Proc) ( | ||
| 740 | IN HMENU, | ||
| 741 | IN UINT, | ||
| 742 | IN UINT_PTR, | ||
| 743 | IN LPCWSTR); | ||
| 739 | 744 | ||
| 740 | /* arch-tag: f201d05a-1240-4fc5-8ea4-ca24d4ee5671 | 745 | /* arch-tag: f201d05a-1240-4fc5-8ea4-ca24d4ee5671 |
| 741 | (do not change this comment) */ | 746 | (do not change this comment) */ |
diff --git a/src/window.c b/src/window.c index 8a704bdc298..c64e8557b56 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3059,7 +3059,9 @@ BUFFER can be a buffer or the name of an existing buffer. | |||
| 3059 | Optional third arg KEEP-MARGINS non-nil means that WINDOW's current | 3059 | Optional third arg KEEP-MARGINS non-nil means that WINDOW's current |
| 3060 | display margins, fringe widths, and scroll bar settings are maintained; | 3060 | display margins, fringe widths, and scroll bar settings are maintained; |
| 3061 | the default is to reset these from BUFFER's local settings or the frame | 3061 | the default is to reset these from BUFFER's local settings or the frame |
| 3062 | defaults. */) | 3062 | defaults. |
| 3063 | |||
| 3064 | This function runs the hook `window-scroll-functions'. */) | ||
| 3063 | (window, buffer, keep_margins) | 3065 | (window, buffer, keep_margins) |
| 3064 | register Lisp_Object window, buffer, keep_margins; | 3066 | register Lisp_Object window, buffer, keep_margins; |
| 3065 | { | 3067 | { |
diff --git a/src/xdisp.c b/src/xdisp.c index 6a12cb57551..9953e65d070 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10655,6 +10655,7 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) | |||
| 10655 | int string_before_pos; | 10655 | int string_before_pos; |
| 10656 | int x = row->x; | 10656 | int x = row->x; |
| 10657 | int cursor_x = x; | 10657 | int cursor_x = x; |
| 10658 | int cursor_from_overlay_pos = 0; | ||
| 10658 | int pt_old = PT - delta; | 10659 | int pt_old = PT - delta; |
| 10659 | 10660 | ||
| 10660 | /* Skip over glyphs not having an object at the start of the row. | 10661 | /* Skip over glyphs not having an object at the start of the row. |
| @@ -10680,6 +10681,12 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) | |||
| 10680 | string_start = NULL; | 10681 | string_start = NULL; |
| 10681 | x += glyph->pixel_width; | 10682 | x += glyph->pixel_width; |
| 10682 | ++glyph; | 10683 | ++glyph; |
| 10684 | if (cursor_from_overlay_pos | ||
| 10685 | && last_pos > cursor_from_overlay_pos) | ||
| 10686 | { | ||
| 10687 | cursor_from_overlay_pos = 0; | ||
| 10688 | cursor = 0; | ||
| 10689 | } | ||
| 10683 | } | 10690 | } |
| 10684 | else | 10691 | else |
| 10685 | { | 10692 | { |
| @@ -10689,10 +10696,21 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) | |||
| 10689 | /* Skip all glyphs from string. */ | 10696 | /* Skip all glyphs from string. */ |
| 10690 | do | 10697 | do |
| 10691 | { | 10698 | { |
| 10699 | int pos; | ||
| 10692 | if ((cursor == NULL || glyph > cursor) | 10700 | if ((cursor == NULL || glyph > cursor) |
| 10693 | && !NILP (Fget_char_property (make_number ((glyph)->charpos), | 10701 | && !NILP (Fget_char_property (make_number ((glyph)->charpos), |
| 10694 | Qcursor, (glyph)->object))) | 10702 | Qcursor, (glyph)->object)) |
| 10703 | && (pos = string_buffer_position (w, glyph->object, | ||
| 10704 | string_before_pos), | ||
| 10705 | (pos == 0 /* From overlay */ | ||
| 10706 | || pos == pt_old))) | ||
| 10695 | { | 10707 | { |
| 10708 | /* Estimate overlay buffer position from the buffer | ||
| 10709 | positions of the glyphs before and after the overlay. | ||
| 10710 | Add 1 to last_pos so that if point corresponds to the | ||
| 10711 | glyph right after the overlay, we still use a 'cursor' | ||
| 10712 | property found in that overlay. */ | ||
| 10713 | cursor_from_overlay_pos = pos == 0 ? last_pos+1 : 0; | ||
| 10696 | cursor = glyph; | 10714 | cursor = glyph; |
| 10697 | cursor_x = x; | 10715 | cursor_x = x; |
| 10698 | } | 10716 | } |
| @@ -15775,15 +15793,16 @@ store_mode_line_string (string, lisp_string, copy_string, field_width, precision | |||
| 15775 | 15793 | ||
| 15776 | 15794 | ||
| 15777 | DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, | 15795 | DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, |
| 15778 | 0, 3, 0, | 15796 | 0, 4, 0, |
| 15779 | doc: /* Return the mode-line of selected window as a string. | 15797 | doc: /* Return the mode-line of selected window as a string. |
| 15780 | First optional arg FORMAT specifies a different format string (see | 15798 | First optional arg FORMAT specifies a different format string (see |
| 15781 | `mode-line-format' for details) to use. If FORMAT is t, return | 15799 | `mode-line-format' for details) to use. If FORMAT is t, return |
| 15782 | the buffer's header-line. Second optional arg WINDOW specifies a | 15800 | the buffer's header-line. Second optional arg WINDOW specifies a |
| 15783 | different window to use as the context for the formatting. | 15801 | different window to use as the context for the formatting. |
| 15784 | If third optional arg NO-PROPS is non-nil, string is not propertized. */) | 15802 | If third optional arg NO-PROPS is non-nil, string is not propertized. |
| 15785 | (format, window, no_props) | 15803 | Fourth optional arg BUFFER specifies which buffer to use. */) |
| 15786 | Lisp_Object format, window, no_props; | 15804 | (format, window, no_props, buffer) |
| 15805 | Lisp_Object format, window, no_props, buffer; | ||
| 15787 | { | 15806 | { |
| 15788 | struct it it; | 15807 | struct it it; |
| 15789 | int len; | 15808 | int len; |
| @@ -15795,12 +15814,16 @@ If third optional arg NO-PROPS is non-nil, string is not propertized. */) | |||
| 15795 | window = selected_window; | 15814 | window = selected_window; |
| 15796 | CHECK_WINDOW (window); | 15815 | CHECK_WINDOW (window); |
| 15797 | w = XWINDOW (window); | 15816 | w = XWINDOW (window); |
| 15798 | CHECK_BUFFER (w->buffer); | ||
| 15799 | 15817 | ||
| 15800 | if (XBUFFER (w->buffer) != current_buffer) | 15818 | if (NILP (buffer)) |
| 15819 | buffer = w->buffer; | ||
| 15820 | |||
| 15821 | CHECK_BUFFER (buffer); | ||
| 15822 | |||
| 15823 | if (XBUFFER (buffer) != current_buffer) | ||
| 15801 | { | 15824 | { |
| 15802 | old_buffer = current_buffer; | 15825 | old_buffer = current_buffer; |
| 15803 | set_buffer_internal_1 (XBUFFER (w->buffer)); | 15826 | set_buffer_internal_1 (XBUFFER (buffer)); |
| 15804 | } | 15827 | } |
| 15805 | 15828 | ||
| 15806 | if (NILP (format) || EQ (format, Qt)) | 15829 | if (NILP (format) || EQ (format, Qt)) |
| @@ -16103,7 +16126,10 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) | |||
| 16103 | generated by character C. PRECISION >= 0 means don't return a | 16126 | generated by character C. PRECISION >= 0 means don't return a |
| 16104 | string longer than that value. FIELD_WIDTH > 0 means pad the | 16127 | string longer than that value. FIELD_WIDTH > 0 means pad the |
| 16105 | string returned with spaces to that value. Return 1 in *MULTIBYTE | 16128 | string returned with spaces to that value. Return 1 in *MULTIBYTE |
| 16106 | if the result is multibyte text. */ | 16129 | if the result is multibyte text. |
| 16130 | |||
| 16131 | Note we operate on the current buffer for most purposes, | ||
| 16132 | the exception being w->base_line_pos. */ | ||
| 16107 | 16133 | ||
| 16108 | static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; | 16134 | static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; |
| 16109 | 16135 | ||
| @@ -16117,7 +16143,7 @@ decode_mode_spec (w, c, field_width, precision, multibyte) | |||
| 16117 | Lisp_Object obj; | 16143 | Lisp_Object obj; |
| 16118 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 16144 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 16119 | char *decode_mode_spec_buf = f->decode_mode_spec_buffer; | 16145 | char *decode_mode_spec_buf = f->decode_mode_spec_buffer; |
| 16120 | struct buffer *b = XBUFFER (w->buffer); | 16146 | struct buffer *b = current_buffer; |
| 16121 | 16147 | ||
| 16122 | obj = Qnil; | 16148 | obj = Qnil; |
| 16123 | *multibyte = 0; | 16149 | *multibyte = 0; |
| @@ -16419,7 +16445,7 @@ decode_mode_spec (w, c, field_width, precision, multibyte) | |||
| 16419 | 16445 | ||
| 16420 | case 's': | 16446 | case 's': |
| 16421 | /* status of process */ | 16447 | /* status of process */ |
| 16422 | obj = Fget_buffer_process (w->buffer); | 16448 | obj = Fget_buffer_process (Fcurrent_buffer ()); |
| 16423 | if (NILP (obj)) | 16449 | if (NILP (obj)) |
| 16424 | return "no process"; | 16450 | return "no process"; |
| 16425 | #ifdef subprocesses | 16451 | #ifdef subprocesses |
diff --git a/src/xmenu.c b/src/xmenu.c index aa963935262..5c3d5804355 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* X Communication module for terminals which understand the X protocol. | 1 | /* X Communication module for terminals which understand the X protocol. |
| 2 | Copyright (C) 1986, 88, 93, 94, 96, 99, 2000, 2001, 2003 | 2 | Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -1801,7 +1801,7 @@ update_submenu_strings (first_wv) | |||
| 1801 | 1801 | ||
| 1802 | for (wv = first_wv; wv; wv = wv->next) | 1802 | for (wv = first_wv; wv; wv = wv->next) |
| 1803 | { | 1803 | { |
| 1804 | if (wv->lname && ! NILP (wv->lname)) | 1804 | if (STRINGP (wv->lname)) |
| 1805 | { | 1805 | { |
| 1806 | wv->name = SDATA (wv->lname); | 1806 | wv->name = SDATA (wv->lname); |
| 1807 | 1807 | ||
| @@ -1815,7 +1815,7 @@ update_submenu_strings (first_wv) | |||
| 1815 | } | 1815 | } |
| 1816 | } | 1816 | } |
| 1817 | 1817 | ||
| 1818 | if (wv->lkey && ! NILP (wv->lkey)) | 1818 | if (STRINGP (wv->lkey)) |
| 1819 | wv->key = SDATA (wv->lkey); | 1819 | wv->key = SDATA (wv->lkey); |
| 1820 | 1820 | ||
| 1821 | if (wv->contents) | 1821 | if (wv->contents) |
| @@ -1888,7 +1888,7 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1888 | #endif | 1888 | #endif |
| 1889 | Lisp_Object items; | 1889 | Lisp_Object items; |
| 1890 | widget_value *wv, *first_wv, *prev_wv = 0; | 1890 | widget_value *wv, *first_wv, *prev_wv = 0; |
| 1891 | int i, last_i; | 1891 | int i, last_i = 0; |
| 1892 | int *submenu_start, *submenu_end; | 1892 | int *submenu_start, *submenu_end; |
| 1893 | int *submenu_top_level_items, *submenu_n_panes; | 1893 | int *submenu_top_level_items, *submenu_n_panes; |
| 1894 | 1894 | ||