Mercurial > hg > xemacs-beta
diff src/device-msw.c @ 5338:8608eadee6ba
Move #'delq, #'delete to Lisp, adding support for sequences.
src/ChangeLog addition:
2011-01-11 Aidan Kehoe <kehoea@parhasard.net>
* device-msw.c (Fmswindows_printer_list): Remove a Fdelete ()
call here, remove the necessity for it.
* fns.c (Fdelete, Fdelq):
* lisp.h:
Move #'delete, #'delq to Lisp, implemented in terms of #'delete*
* select.c (Fown_selection_internal):
* select.c (handle_selection_clear):
Use delq_no_quit() in these functions, don't reimplement it or use
Fdelq(), which is now gone.
lisp/ChangeLog addition:
2011-01-11 Aidan Kehoe <kehoea@parhasard.net>
* subr.el (delete, delq, remove, remq): Move #'remove, #'remq
here, they don't belong in cl-seq.el; move #'delete, #'delq here
from fns.c, implement them in terms of #'delete*, allowing support
for sequences generally.
* update-elc.el (do-autoload-commands): Use #'delete*, not #'delq
here, now the latter's no longer dumped.
* cl-macs.el (delete, delq): Add compiler macros transforming
#'delete and #'delq to #'delete* calls.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 14 Jan 2011 23:35:29 +0000 |
parents | 635f4b506855 |
children | a9094f28f9a9 |
line wrap: on
line diff
--- a/src/device-msw.c Fri Jan 14 23:23:30 2011 +0000 +++ b/src/device-msw.c Fri Jan 14 23:35:29 2011 +0000 @@ -1329,9 +1329,12 @@ GCPRO2 (result, def_printer); + def_printer = msprinter_default_printer (); + while (num_printers--) { Extbyte *printer_name; + Lisp_Object printer_name_lisp; if (have_nt) { PRINTER_INFO_4 *info = (PRINTER_INFO_4 *) data_buf; @@ -1343,12 +1346,15 @@ printer_name = (Extbyte *) info->pPrinterName; } data_buf += enum_entry_size; - - result = Fcons (build_tstr_string (printer_name), result); + + printer_name_lisp = build_tstr_string (printer_name); + if (0 != qxestrcasecmp (XSTRING_DATA (def_printer), + XSTRING_DATA (printer_name_lisp))) + { + result = Fcons (printer_name_lisp, result); + } } - def_printer = msprinter_default_printer (); - result = Fdelete (def_printer, result); result = Fcons (def_printer, result); RETURN_UNGCPRO (result);