aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-12-21 17:33:40 +0000
committerStefan Monnier2005-12-21 17:33:40 +0000
commita425bd036ee1f22e6f7f4c4f7222371b10ff189f (patch)
treeba834189ddccc455048ac28ba767f627cbf9ee69
parentaa0b0cd9bcc6ace7a4673064db8f3e44c278c2e9 (diff)
downloademacs-a425bd036ee1f22e6f7f4c4f7222371b10ff189f.tar.gz
emacs-a425bd036ee1f22e6f7f4c4f7222371b10ff189f.zip
(Fdisplay_completion_list): Use XCAR/XCDR.
(Fminibuffer_completion_help): Remove duplicates before display.
-rw-r--r--src/ChangeLog28
-rw-r--r--src/minibuf.c22
2 files changed, 33 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c82e24b8754..17acc9670cd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12005-12-21 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * minibuf.c (Fdisplay_completion_list): Use XCAR/XCDR.
4 (Fminibuffer_completion_help): Remove duplicates before display.
5
12005-12-21 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> 62005-12-21 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu>
2 7
3 * print.c (print_preprocess): Don't loose print_depth levels while 8 * print.c (print_preprocess): Don't loose print_depth levels while
@@ -61,15 +66,15 @@
61 (x_use_underline_position_properties): Undo 2005-07-13 change. 66 (x_use_underline_position_properties): Undo 2005-07-13 change.
62 (syms_of_macterm) <x-use-underline-position-properties>: Likewise. 67 (syms_of_macterm) <x-use-underline-position-properties>: Likewise.
63 (mac_use_core_graphics, mac_wheel_button_is_mouse_2) 68 (mac_use_core_graphics, mac_wheel_button_is_mouse_2)
64 (mac_pass_command_to_system, mac_pass_control_to_system): New 69 (mac_pass_command_to_system, mac_pass_control_to_system):
65 boolean variables renamed from Lisp_Object ones 70 New boolean variables renamed from Lisp_Object ones
66 Vmac_use_core_graphics, Vmac_wheel_button_is_mouse_2, 71 Vmac_use_core_graphics, Vmac_wheel_button_is_mouse_2,
67 Vmac_pass_command_to_system, and Vmac_pass_control_to_system. All 72 Vmac_pass_command_to_system, and Vmac_pass_control_to_system.
68 uses changed. 73 All uses changed.
69 (syms_of_macterm): DEFVAR_BOOL them. Remove previous DEFVAR_LISPs. 74 (syms_of_macterm): DEFVAR_BOOL them. Remove previous DEFVAR_LISPs.
70 Make them user options. 75 Make them user options.
71 (mac_handle_command_event, mac_store_services_event): Call 76 (mac_handle_command_event, mac_store_services_event):
72 create_apple_event_from_event_ref without 5th argument. 77 Call create_apple_event_from_event_ref without 5th argument.
73 (backtranslate_modified_keycode): Mask off modifier keys that are 78 (backtranslate_modified_keycode): Mask off modifier keys that are
74 mapped to some Emacs modifiers before passing it to KeyTranslate. 79 mapped to some Emacs modifiers before passing it to KeyTranslate.
75 (syms_of_macterm): Make variables `mac-emulate-three-button-mouse', 80 (syms_of_macterm): Make variables `mac-emulate-three-button-mouse',
@@ -77,8 +82,8 @@
77 Fix docstrings of `mac-*-modifier'. 82 Fix docstrings of `mac-*-modifier'.
78 83
79 * mac.c (create_apple_event_from_event_ref): Remove arg `types'. 84 * mac.c (create_apple_event_from_event_ref): Remove arg `types'.
80 (do_applescript): Change argument types to Lisp_Object. All uses 85 (do_applescript): Change argument types to Lisp_Object.
81 changed. 86 All uses changed.
82 87
83 * macterm.h (create_apple_event_from_event_ref): Remove 5th 88 * macterm.h (create_apple_event_from_event_ref): Remove 5th
84 argument from extern. 89 argument from extern.
@@ -121,9 +126,9 @@
121 126
122 * xfns.c (compute_tip_xy): Handle negative dx and dy. 127 * xfns.c (compute_tip_xy): Handle negative dx and dy.
123 128
124 * w32fns.c (compute_tip_xy): Ditto 129 * w32fns.c (compute_tip_xy): Ditto.
125 130
126 * macfns.c (compute_tip_xy): Ditto 131 * macfns.c (compute_tip_xy): Ditto.
127 132
1282005-12-14 Chong Yidong <cyd@stupidchicken.com> 1332005-12-14 Chong Yidong <cyd@stupidchicken.com>
129 134
@@ -201,8 +206,7 @@
201 * mac.c (Qundecoded_file_name): New variable. 206 * mac.c (Qundecoded_file_name): New variable.
202 (syms_of_mac): Initialize it. 207 (syms_of_mac): Initialize it.
203 (mac_aelist_to_lisp, mac_aedesc_to_lisp): New functions. 208 (mac_aelist_to_lisp, mac_aedesc_to_lisp): New functions.
204 [TARGET_API_MAC_CARBON] (create_apple_event_from_event_ref): New 209 [TARGET_API_MAC_CARBON] (create_apple_event_from_event_ref): New fun.
205 function.
206 (Fmac_coerce_ae_data): New defun. 210 (Fmac_coerce_ae_data): New defun.
207 (syms_of_mac): Defsubr it. 211 (syms_of_mac): Defsubr it.
208 212
diff --git a/src/minibuf.c b/src/minibuf.c
index 4016d57c0c1..17d4fc9c1a5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2404,7 +2404,7 @@ during running `completion-setup-hook'. */)
2404 else 2404 else
2405 { 2405 {
2406 write_string ("Possible completions are:", -1); 2406 write_string ("Possible completions are:", -1);
2407 for (tail = completions, i = 0; !NILP (tail); tail = Fcdr (tail), i++) 2407 for (tail = completions, i = 0; CONSP (tail); tail = XCDR (tail), i++)
2408 { 2408 {
2409 Lisp_Object tem, string; 2409 Lisp_Object tem, string;
2410 int length; 2410 int length;
@@ -2412,7 +2412,7 @@ during running `completion-setup-hook'. */)
2412 2412
2413 startpos = Qnil; 2413 startpos = Qnil;
2414 2414
2415 elt = Fcar (tail); 2415 elt = XCAR (tail);
2416 if (SYMBOLP (elt)) 2416 if (SYMBOLP (elt))
2417 elt = SYMBOL_NAME (elt); 2417 elt = SYMBOL_NAME (elt);
2418 /* Compute the length of this element. */ 2418 /* Compute the length of this element. */
@@ -2588,9 +2588,21 @@ DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_co
2588 temp_echo_area_glyphs (build_string (" [No completions]")); 2588 temp_echo_area_glyphs (build_string (" [No completions]"));
2589 } 2589 }
2590 else 2590 else
2591 internal_with_output_to_temp_buffer ("*Completions*", 2591 {
2592 display_completion_list_1, 2592 /* Sort and remove duplicates. */
2593 Fsort (completions, Qstring_lessp)); 2593 Lisp_Object tmp = completions = Fsort (completions, Qstring_lessp);
2594 while (CONSP (tmp))
2595 {
2596 if (CONSP (XCDR (tmp))
2597 && !NILP (Fequal (XCAR (tmp), XCAR (XCDR (tmp)))))
2598 XSETCDR (tmp, XCDR (XCDR (tmp)));
2599 else
2600 tmp = XCDR (tmp);
2601 }
2602 internal_with_output_to_temp_buffer ("*Completions*",
2603 display_completion_list_1,
2604 completions);
2605 }
2594 return Qnil; 2606 return Qnil;
2595} 2607}
2596 2608