# HG changeset patch # User ben # Date 989138021 0 # Node ID 5bdbc721d46a44e0bb730a734323adf932b8c7c5 # Parent 68eb53e4b7e541bdb9cd4e7974217bd1e2eca2e6 [xemacs-hg @ 2001-05-06 08:33:35 by ben] implement printing the selection when it's selected. force redisplay when set-charset-ccl-program called. if bytecomp or byte-optimize need recompiling, then load the .el version of them first, recompile them, and reload the .elc versions to recompile everything else (so we won't be waiting until the cows come home). diff -r 68eb53e4b7e5 -r 5bdbc721d46a lisp/ChangeLog --- a/lisp/ChangeLog Sat May 05 10:53:30 2001 +0000 +++ b/lisp/ChangeLog Sun May 06 08:33:41 2001 +0000 @@ -1,3 +1,24 @@ +2001-05-06 Ben Wing + + * dialog.el (make-dialog-box): + * menubar-items.el (default-menubar): + * printer.el (generic-print-buffer): + * printer.el (generic-print-region): + implement printing the selection when it's selected. + + unrelated: + + * minibuf.el (input-error): + * subr.el (error): + a couple of error cleanups. + + * update-elc.el ((preloaded-file-list site-load-packages need-to-dump dumped-exe)): + * update-elc.el (update-elc-files-to-compile): + if bytecomp or byte-optimize need recompiling, then load + the .el version of them first, recompile them, and reload + the .elc versions to recompile everything else (so we won't + be waiting until the cows come home). + 2001-05-05 Ben Wing * subr.el (error): diff -r 68eb53e4b7e5 -r 5bdbc721d46a lisp/dialog.el --- a/lisp/dialog.el Sat May 05 10:53:30 2001 +0000 +++ b/lisp/dialog.el Sun May 06 08:33:41 2001 +0000 @@ -189,12 +189,10 @@ :spec The widget spec -- anything that can be passed to `make-glyph'. - :title The title of the frame. :parent The frame is made a child of this frame (defaults to the selected frame). - :properties Additional properties of the frame, as well as `dialog-frame-plist'. @@ -276,8 +274,16 @@ An 'msprinter device. :print-settings A printer settings object. +:allow-selection + t or nil -- whether the \"Selection\" button is enabled (defaults to nil). +:allow-pages + t or nil -- whether the \"Pages\" button and associated edit controls + are enabled (defaults to t). +:selected-page-button + `all', `selection', or `pages' -- which page button is initially + selected. -Exactly one of these keywords must be given. +Exactly one of :device and :print-settings must be given. The function brings up the Print dialog, where the user can select a different printer and/or change printer options. Connection @@ -290,17 +296,20 @@ Return value is nil if the user has canceled the dialog. Otherwise, it is a new plist, with the following properties: - name Printer device name, even if unchanged by the user. - from-page First page to print, 1-based. If not specified by the user, - then this value is not included in the plist. - to-page Last page to print, inclusive, 1-based. If not specified by - the user, then this value is not included in the plist. - copies Number of copies to print. Always returned. + name Printer device name, even if unchanged by the user. + from-page First page to print, 1-based. Returned if + `selected-page-button' is `pages'. + user, then this value is not included in the plist. + to-page Last page to print, inclusive, 1-based. Returned if + `selected-page-button' is `pages'. + copies Number of copies to print. Always returned. + selected-page-button Which page button was selected (`all', `selection', + or `pages'). The DEVICE is destroyed and an error is signaled in case of initialization problem with the new printer. -See also the `page-setup' and `print-setup' dialog boxes. +See also the `page-setup' dialog box type. --------------------------------------------------------------------------- @@ -346,42 +355,7 @@ The DEVICE is destroyed and an error is signaled in case of initialization problem with the new printer. -See also the `print' and `print-setup' dialogs. - ---------------------------------------------------------------------------- - -For type `print-setup': - -This invokes the Windows standard Print Setup dialog. -This dialog is usually invoked when the user selects the Printer Setup -command. - -The keywords allowed are - -:device - An 'msprinter device. -:print-settings - A printer settings object. - -Exactly one of these keywords must be given. - -The function brings up the Print Setup dialog, where the user -can select a different printer and/or change printer options. -Connection name can change as a result of selecting a different printer -device. If a printer is specified, then changes are stored into the -settings object currently selected into that printer. If a settings -object is supplied, then changes are recorded into it, and, it it is -selected into a printer, then changes are propagated to that printer -too. - -Return value is nil if the user has canceled the dialog. Otherwise, it -is a new plist, with the following properties: - name Printer device name, even if unchanged by the user. - -The printer device is destroyed and an error is signaled if new printer -is selected by the user, but cannot be initialized. - -See also the `print' and `page-setup' dialogs. +See also the `print' dialog box type. --------------------------------------------------------------------------- diff -r 68eb53e4b7e5 -r 5bdbc721d46a lisp/menubar-items.el --- a/lisp/menubar-items.el Sat May 05 10:53:30 2001 +0000 +++ b/lisp/menubar-items.el Sun May 06 08:33:41 2001 +0000 @@ -147,8 +147,9 @@ :active (or (valid-specifier-tag-p 'msprinter) (and (not (eq system-type 'windows-nt)) (fboundp 'lpr-region))) - :suffix (if put-buffer-names-in-file-menu (concat (buffer-name) "...") - "...")] + :suffix (if (region-active-p) "Selection..." + (if put-buffer-names-in-file-menu (concat (buffer-name) "...") + "..."))] ,@(unless (eq system-type 'windows-nt) '(["Prett%_y-Print" ps-print-buffer-with-faces :active (fboundp 'ps-print-buffer-with-faces) diff -r 68eb53e4b7e5 -r 5bdbc721d46a lisp/minibuf.el --- a/lisp/minibuf.el Sat May 05 10:53:30 2001 +0000 +++ b/lisp/minibuf.el Sun May 06 08:33:41 2001 +0000 @@ -340,11 +340,7 @@ integer) :group 'minibuffer) -(define-error 'input-error "Keyboard input error") - -(put 'input-error 'display-error - #'(lambda (error-object stream) - (princ (cadr error-object) stream))) +(define-error 'input-error "Keyboard input error" 'io-error) (defun read-from-minibuffer (prompt &optional initial-contents keymap diff -r 68eb53e4b7e5 -r 5bdbc721d46a lisp/printer.el --- a/lisp/printer.el Sat May 05 10:53:30 2001 +0000 +++ b/lisp/printer.el Sun May 06 08:33:41 2001 +0000 @@ -253,18 +253,29 @@ If BUFFER is nil or omitted, the current buffer is used." (interactive (list nil (not current-prefix-arg))) - (if (or (not (valid-specifier-tag-p 'msprinter)) - (not display-print-dialog)) - (generic-print-region (point-min buffer) (point-max buffer) buffer) - (let* ((d (Printer-get-device)) - (props (condition-case err - (make-dialog-box 'print :device d) - (error - (Printer-clear-device) - (signal (car err) (cdr err)))))) - (and props (generic-print-region (point-min buffer) - (point-max buffer) buffer - d props))))) + (let* ((print-region (and (interactive-p) (region-active-p))) + (start (if print-region (region-beginning) (point-min buffer))) + (end (if print-region (region-end) (point-max buffer)))) + (if (or (not (valid-specifier-tag-p 'msprinter)) + (not display-print-dialog)) + (generic-print-region start end buffer) + (let* ((d (Printer-get-device)) + (props (condition-case err + (make-dialog-box 'print :device d + :allow-selection print-region + :selected-page-button + (if print-region 'selection 'all)) + (error + (Printer-clear-device) + (signal (car err) (cdr err)))))) + (and props + (let ((really-print-region + (eq (plist-get props 'selected-page-button) 'selection))) + (generic-print-region (if really-print-region start + (point-min buffer)) + (if really-print-region end + (point-max buffer)) + buffer d props))))))) (defun generic-print-region (start end &optional buffer print-device props) "Print region using a printing method appropriate to the O.S. being run. @@ -295,131 +306,141 @@ the end. copies Number of copies to print. If omitted, one copy is printed." (cond ((valid-specifier-tag-p 'msprinter) - (let (d f header-buffer footer-buffer) - (setq buffer (decode-buffer buffer)) - (unwind-protect - (progn - (setq d (or print-device (Printer-get-device))) - (setq f (make-frame - (list* 'name (concat + ;; loop, printing one copy of document per loop. kill and + ;; re-create the frame each time so that we eject the piece + ;; of paper at the end even if we're printing more than one + ;; page per sheet of paper. + (let ((copies (plist-get props 'copies 1))) + (while (> copies 0) + (let (d f header-buffer footer-buffer) + (setq buffer (decode-buffer buffer)) + (unwind-protect + (with-current-buffer buffer + (save-restriction + (narrow-to-region start end) + (setq d (or print-device (Printer-get-device))) + (setq f (make-frame + (list* 'name + (concat (substitute ?_ ?. (buffer-name buffer)) " - XEmacs") - '(menubar-visible-p - nil - has-modeline-p nil - default-toolbar-visible-p nil - default-gutter-visible-p nil - minibuffer none - modeline-shadow-thickness 0 - vertical-scrollbar-visible-p nil - horizontal-scrollbar-visible-p nil)) - d)) - (let* ((w (frame-root-window f)) - (vertdpi (cdr (device-system-metric d 'device-dpi))) - (pixel-vertical-clip-threshold (/ vertdpi 2)) - (from-page (plist-get props 'from-page 1)) - (to-page (plist-get props 'to-page)) - (copies (plist-get props 'copies 1)) - (context (make-Print-context - :start-time (current-time) - ;; #### bogus! we need accessors for - ;; print-settings objects. - :printer-name - (or (plist-get props 'name) - printer-name - (mswindows-get-default-printer)))) - header-window - footer-window) + '(menubar-visible-p + nil + has-modeline-p nil + default-toolbar-visible-p nil + default-gutter-visible-p nil + minibuffer none + modeline-shadow-thickness 0 + vertical-scrollbar-visible-p nil + horizontal-scrollbar-visible-p nil)) + d)) + (let* ((w (frame-root-window f)) + (vertdpi + (cdr (device-system-metric d 'device-dpi))) + (pixel-vertical-clip-threshold (/ vertdpi 2)) + (from-page (plist-get props 'from-page 1)) + (to-page (plist-get props 'to-page)) + (context (make-Print-context + :start-time (current-time) + ;; #### bogus! we need accessors for + ;; print-settings objects. + :printer-name + (or (plist-get props 'name) + printer-name + (mswindows-get-default-printer)))) + header-window + footer-window) - (when printer-page-header - (let ((window-min-height 2)) - (setq header-window w) - (setq w (split-window w 2))) - (setq header-buffer (generate-new-buffer " *header*")) - (set-window-buffer header-window header-buffer)) - - (when printer-page-footer - (let ((window-min-height 2)) - (setq footer-window - (split-window w (- (window-height w) 2)))) - (setq footer-buffer (generate-new-buffer " *footer*")) - (set-window-buffer footer-window footer-buffer)) + (when printer-page-header + (let ((window-min-height 2)) + (setq header-window w) + (setq w (split-window w 2))) + (setq header-buffer + (generate-new-buffer " *header*")) + (set-window-buffer header-window header-buffer)) - (setf (Print-context-window context) w) + (when printer-page-footer + (let ((window-min-height 2)) + (setq footer-window + (split-window w (- (window-height w) 2)))) + (setq footer-buffer + (generate-new-buffer " *footer*")) + (set-window-buffer footer-window footer-buffer)) - ;; loop, printing one copy of document per loop - (while (> copies 0) - (let ((last-end 0) ; bufpos at end of previous page - reached-end ; t if we've reached the end of the + (setf (Print-context-window context) w) + + (let ((last-end 0) ; bufpos at end of previous page + reached-end ; t if we've reached the end of the ; text we're printing - (pageno 1)) - (set-window-buffer w buffer) - (set-window-start w start) + (pageno 1)) + (set-window-buffer w buffer) + (set-window-start w start) - ;; loop, printing one page per loop - (while (and (not reached-end) - ;; stop at end of region of text or - ;; outside of ranges of pages given - (or (not to-page) (<= pageno to-page))) + ;; loop, printing one page per loop + (while (and (not reached-end) + ;; stop at end of region of text or + ;; outside of ranges of pages given + (or (not to-page) (<= pageno to-page))) - (setf (Print-context-pageno context) pageno) + (setf (Print-context-pageno context) pageno) - ;; only actually print the page if it's in the - ;; range. - (when (>= pageno from-page) - (when printer-page-header - (with-current-buffer header-buffer - (erase-buffer) - (generate-header-line printer-page-header - context) - (goto-char (point-min)) - (set-window-start header-window (point-min)))) + ;; only actually print the page if it's in the + ;; range. + (when (>= pageno from-page) + (when printer-page-header + (with-current-buffer header-buffer + (erase-buffer) + (generate-header-line printer-page-header + context) + (goto-char (point-min)) + (set-window-start header-window + (point-min)))) - (when printer-page-footer - (with-current-buffer footer-buffer - (erase-buffer) - (insert "\n") - (generate-header-line printer-page-footer - context) - (goto-char (point-min)) - (set-window-start footer-window (point-min)))) + (when printer-page-footer + (with-current-buffer footer-buffer + (erase-buffer) + (insert "\n") + (generate-header-line printer-page-footer + context) + (goto-char (point-min)) + (set-window-start footer-window + (point-min)))) - (redisplay-frame f t) - (print-job-eject-page f) - ) - ;; but use the GUARANTEE argument to `window-end' - ;; so that we get the right value even if we - ;; didn't do a redisplay. - (let ((this-end (window-end w t)) - (pixvis (window-last-line-visible-height w))) - ;; in case we get stuck somewhere, bow out - ;; rather than printing an infinite number of - ;; pages. #### this will fail with an image - ;; bigger than an entire page. but we really - ;; need this check here. we should be more - ;; clever in our check, to deal with this case. - (if (or (= this-end last-end) - ;; #### fuckme! window-end returns a value - ;; outside of the valid range of buffer - ;; positions!!! - (>= this-end end)) - (setq reached-end t) - (setq last-end this-end) - (set-window-start w this-end) - (if pixvis - (save-selected-window - (select-window w) - ;; #### scroll-down should take a - ;; window arg. - (let ((window-pixel-scroll-increment - pixvis)) - (scroll-down 1)))))) - (setq pageno (1+ pageno)))) - (setq copies (1- copies))))) - (and f (delete-frame f)) - (and header-buffer (kill-buffer header-buffer)) - (and footer-buffer (kill-buffer footer-buffer)) - ))) + (redisplay-frame f t) + (print-job-eject-page f) + ) + ;; but use the GUARANTEE argument to `window-end' + ;; so that we get the right value even if we + ;; didn't do a redisplay. + (let ((this-end (window-end w t)) + (pixvis + (window-last-line-visible-height w))) + ;; in case we get stuck somewhere, bow out + ;; rather than printing an infinite number of + ;; pages. #### this will fail with an image + ;; bigger than an entire page. but we really + ;; need this check here. we should be more + ;; clever in our check, to deal with this case. + (if (or (= this-end last-end) + ;; #### fuckme! window-end returns a + ;; value outside of the valid range of + ;; buffer positions!!! + (>= this-end end)) + (setq reached-end t) + (setq last-end this-end) + (set-window-start w this-end) + (if pixvis + (with-selected-window w + ;; #### scroll-down should take a + ;; window arg. + (let ((window-pixel-scroll-increment + pixvis)) + (scroll-down 1)))))) + (setq pageno (1+ pageno)))))) + (and f (delete-frame f)) + (and header-buffer (kill-buffer header-buffer)) + (and footer-buffer (kill-buffer footer-buffer))))) + (setq copies (1- copies))))) ((and (not (eq system-type 'windows-nt)) (fboundp 'lpr-region)) (lpr-region buffer)) diff -r 68eb53e4b7e5 -r 5bdbc721d46a lisp/subr.el --- a/lisp/subr.el Sat May 05 10:53:30 2001 +0000 +++ b/lisp/subr.el Sun May 06 08:33:41 2001 +0000 @@ -636,7 +636,6 @@ invalid-regexp specifier-syntax-error - invalid-argument wrong-type-argument args-out-of-range diff -r 68eb53e4b7e5 -r 5bdbc721d46a lisp/update-elc.el --- a/lisp/update-elc.el Sat May 05 10:53:30 2001 +0000 +++ b/lisp/update-elc.el Sun May 06 08:33:41 2001 +0000 @@ -99,7 +99,7 @@ (setq preloaded-file-list (append package-preloaded-file-list preloaded-file-list - '("bytecomp") + '("bytecomp" "byte-optimize") packages-hardcoded-lisp))) (load (concat default-directory "../site-packages") t t) @@ -166,11 +166,42 @@ (if update-elc-files-to-compile (progn - (setq command-line-args - (append '("-l" "loadup-el.el" "run-temacs" - "-batch" "-q" "-no-site-file" - "-l" "bytecomp" "-f" "batch-byte-compile") - update-elc-files-to-compile)) + (let ((bytecomp-arg (locate-library "bytecomp")) + (byte-opt-arg (locate-library "byte-optimize"))) + (if (string-match "\\.elc?\\'" bytecomp-arg) + (setq bytecomp-arg (substring bytecomp-arg 0 + (match-beginning 0)))) + (setq bytecomp-arg (concat bytecomp-arg ".el")) + (if (string-match "\\.elc?\\'" byte-opt-arg) + (setq byte-opt-arg (substring byte-opt-arg 0 + (match-beginning 0)))) + (setq byte-opt-arg (concat byte-opt-arg ".el")) + ;; if bytecomp or byte-optimize need recompiling, then load + ;; the .el version of them first, recompile them, and reload + ;; the .elc versions to recompile everything else (so we won't + ;; be waiting until the cows come home). + (setq command-line-args + (append '("-l" "loadup-el.el" "run-temacs" + "-batch" "-q" "-no-site-file") + (if (or + (member bytecomp-arg update-elc-files-to-compile) + (member byte-opt-arg update-elc-files-to-compile)) + (append + '("-eval" "(setq load-ignore-elc-files t)" + "-l" "bytecomp") + (if (member bytecomp-arg + update-elc-files-to-compile) + (append '("-f" "batch-byte-compile-one-file") + (list bytecomp-arg))) + (if (member byte-opt-arg + update-elc-files-to-compile) + (append '("-f" "batch-byte-compile-one-file") + (list byte-opt-arg))) + '("-eval" "(setq load-ignore-elc-files nil)"))) + '("-l" "bytecomp" "-f" "batch-byte-compile") + (delete byte-opt-arg + (delete bytecomp-arg + update-elc-files-to-compile))))) (load "loadup-el.el")) (condition-case nil (delete-file "../src/NOBYTECOMPILE") diff -r 68eb53e4b7e5 -r 5bdbc721d46a src/ChangeLog --- a/src/ChangeLog Sat May 05 10:53:30 2001 +0000 +++ b/src/ChangeLog Sun May 06 08:33:41 2001 +0000 @@ -1,3 +1,20 @@ +2001-05-06 Ben Wing + + * console-msw.h: + * device-msw.c: + * device-msw.c (print_dialog_worker): + * device-msw.c (mswindows_handle_print_dialog_box): + * device-msw.c (syms_of_device_mswindows): + * dialog-msw.c (mswindows_make_dialog_box_internal): + * general-slots.h: + implement printing the selection when it's selected. + + unrelated: + + * mule-charset.c (Fset_charset_ccl_program): + * mule-charset.c (invalidate_charset_font_caches): + force redisplay when set-charset-ccl-program called. + 2001-05-04 Martin Buchholz * s/bsdos4.h (openpty): Add declaration, missing from system headers. diff -r 68eb53e4b7e5 -r 5bdbc721d46a src/console-msw.h --- a/src/console-msw.h Sat May 05 10:53:30 2001 +0000 +++ b/src/console-msw.h Sun May 06 08:33:41 2001 +0000 @@ -376,8 +376,6 @@ Lisp_Object keys); Lisp_Object mswindows_handle_page_setup_dialog_box (struct frame *f, Lisp_Object keys); -Lisp_Object mswindows_handle_print_setup_dialog_box (struct frame *f, - Lisp_Object keys); int mswindows_get_default_margin (Lisp_Object prop); void mswindows_register_popup_frame (Lisp_Object frame); diff -r 68eb53e4b7e5 -r 5bdbc721d46a src/device-msw.c --- a/src/device-msw.c Sat May 05 10:53:30 2001 +0000 +++ b/src/device-msw.c Sun May 06 08:33:41 2001 +0000 @@ -26,6 +26,7 @@ Original authors: Jamie Zawinski and the FSF Rewritten by Ben Wing and Chuck Thompson. Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0. + Print support added by Kirill Katsnelson, July 2000. */ @@ -66,6 +67,11 @@ Lisp_Object Qinit_pre_mswindows_win, Qinit_post_mswindows_win; Lisp_Object Qdevmodep; +static Lisp_Object Q_allow_selection; +static Lisp_Object Q_allow_pages; +static Lisp_Object Q_selected_page_button; +static Lisp_Object Qselected_page_button; + static Lisp_Object allocate_devmode (DEVMODE* src_devmode, int do_copy, char* src_name, struct device *d); @@ -674,11 +680,9 @@ /* * DEV can be either a printer or devmode - * PRINT_P is non-zero for the Print dialog, zero for the - * Page Setup dialog */ static Lisp_Object -print_dialog_worker (Lisp_Object dev, int print_p) +print_dialog_worker (Lisp_Object dev, DWORD flags) { Lisp_Devmode *ldm = decode_devmode (dev); PRINTDLG pd; @@ -687,8 +691,7 @@ pd.lStructSize = sizeof (pd); pd.hwndOwner = mswindows_get_selected_frame_hwnd (); pd.hDevMode = devmode_to_hglobal (ldm); - pd.Flags = (PD_NOSELECTION | PD_USEDEVMODECOPIESANDCOLLATE - | (print_p ? 0 : PD_PRINTSETUP)); + pd.Flags = flags | PD_USEDEVMODECOPIESANDCOLLATE; pd.nMinPage = 0; pd.nMaxPage = 0xFFFF; @@ -708,21 +711,24 @@ /* Do consing in reverse order. Number of copies */ - if (print_p) - result = Fcons (Qcopies, Fcons (make_int (pd.nCopies), result)); + result = Fcons (Qcopies, Fcons (make_int (pd.nCopies), result)); /* Page range */ - if (print_p && (pd.Flags & PD_PAGENUMS)) + if (pd.Flags & PD_PAGENUMS) { result = Fcons (Qto_page, Fcons (make_int (pd.nToPage), result)); result = Fcons (Qfrom_page, Fcons (make_int (pd.nFromPage), result)); + result = Fcons (Qselected_page_button, Fcons (Qpages, result)); } + else if (pd.Flags & PD_SELECTION) + result = Fcons (Qselected_page_button, Fcons (Qselection, result)); + else + result = Fcons (Qselected_page_button, Fcons (Qall, result)); /* Device name */ - result = Fcons (Qname, - Fcons (build_ext_string (ldm->printer_name, - Qmswindows_tstr), - result)); + result = Fcons (Qname, Fcons (build_ext_string (ldm->printer_name, + Qmswindows_tstr), + result)); UNGCPRO; global_free_2_maybe (pd.hDevNames, pd.hDevMode); @@ -731,9 +737,10 @@ } Lisp_Object -mswindows_handle_print_setup_dialog_box (struct frame *f, Lisp_Object keys) +mswindows_handle_print_dialog_box (struct frame *f, Lisp_Object keys) { Lisp_Object device = Qunbound, settings = Qunbound; + DWORD flags = PD_NOSELECTION; { EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys) @@ -748,36 +755,25 @@ CHECK_DEVMODE (value); settings = value; } - else - syntax_error ("Unrecognized print-dialog keyword", key); - } - } - - if ((UNBOUNDP (device) && UNBOUNDP (settings)) || - (!UNBOUNDP (device) && !UNBOUNDP (settings))) - syntax_error ("Exactly one of :device and :printer-settings must be given", - keys); - - return print_dialog_worker (!UNBOUNDP (device) ? device : settings, 0); -} - -Lisp_Object -mswindows_handle_print_dialog_box (struct frame *f, Lisp_Object keys) -{ - Lisp_Object device = Qunbound, settings = Qunbound; - - { - EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys) - { - if (EQ (key, Q_device)) + else if (EQ (key, Q_allow_pages)) + { + if (NILP (value)) + flags |= PD_NOPAGENUMS; + } + else if (EQ (key, Q_allow_selection)) { - device = wrap_device (decode_device (value)); - CHECK_MSPRINTER_DEVICE (device); + if (!NILP (value)) + flags &= ~PD_NOSELECTION; } - else if (EQ (key, Q_printer_settings)) + else if (EQ (key, Q_selected_page_button)) { - CHECK_DEVMODE (value); - settings = value; + if (EQ (value, Qselection)) + flags |= PD_SELECTION; + else if (EQ (value, Qpages)) + flags |= PD_PAGENUMS; + else if (!EQ (value, Qall)) + invalid_argument ("Invalid value for :selected-page-button", + value); } else syntax_error ("Unrecognized print-dialog keyword", key); @@ -789,7 +785,7 @@ syntax_error ("Exactly one of :device and :printer-settings must be given", keys); - return print_dialog_worker (!UNBOUNDP (device) ? device : settings, 1); + return print_dialog_worker (!UNBOUNDP (device) ? device : settings, flags); } int @@ -1291,8 +1287,13 @@ DEFSUBR (Fmswindows_get_default_printer); DEFSUBR (Fmswindows_printer_list); - defsymbol (&Qinit_pre_mswindows_win, "init-pre-mswindows-win"); - defsymbol (&Qinit_post_mswindows_win, "init-post-mswindows-win"); + DEFKEYWORD (Q_allow_selection); + DEFKEYWORD (Q_allow_pages); + DEFKEYWORD (Q_selected_page_button); + DEFSYMBOL (Qselected_page_button); + + DEFSYMBOL (Qinit_pre_mswindows_win); + DEFSYMBOL (Qinit_post_mswindows_win); } void diff -r 68eb53e4b7e5 -r 5bdbc721d46a src/dialog-msw.c --- a/src/dialog-msw.c Sat May 05 10:53:30 2001 +0000 +++ b/src/dialog-msw.c Sun May 06 08:33:41 2001 +0000 @@ -681,8 +681,6 @@ return mswindows_handle_print_dialog_box (f, keys); else if (EQ (type, Qpage_setup)) return mswindows_handle_page_setup_dialog_box (f, keys); - else if (EQ (type, Qprint_setup)) - return mswindows_handle_print_setup_dialog_box (f, keys); else signal_type_error (Qunimplemented, "Dialog box type", type); return Qnil; diff -r 68eb53e4b7e5 -r 5bdbc721d46a src/general-slots.h --- a/src/general-slots.h Sat May 05 10:53:30 2001 +0000 +++ b/src/general-slots.h Sun May 06 08:33:41 2001 +0000 @@ -184,13 +184,13 @@ SYMBOL_KEYWORD (Q_orientation); SYMBOL (Qother); SYMBOL (Qpage_setup); +SYMBOL (Qpages); SYMBOL (Qpeer); SYMBOL (Qpointer); SYMBOL (Qpopup); SYMBOL (Qportrait); SYMBOL (Qprepend); SYMBOL (Qprint); -SYMBOL (Qprint_setup); SYMBOL (Qprinter); SYMBOL_KEYWORD (Q_printer_settings); SYMBOL (Qprocess); @@ -212,6 +212,7 @@ SYMBOL (Qsearch); SYMBOL (Qselected); SYMBOL_KEYWORD (Q_selected); +SYMBOL (Qselection); SYMBOL (Qset_glyph_image); SYMBOL (Qsignal); SYMBOL (Qsimple); diff -r 68eb53e4b7e5 -r 5bdbc721d46a src/mule-charset.c --- a/src/mule-charset.c Sat May 05 10:53:30 2001 +0000 +++ b/src/mule-charset.c Sun May 06 08:33:41 2001 +0000 @@ -1020,6 +1020,7 @@ if (setup_ccl_program (&test_ccl, ccl_program) < 0) signal_simple_error ("Invalid ccl-program", ccl_program); XCHARSET_CCL_PROGRAM (charset) = ccl_program; + face_property_was_changed (Vdefault_face, Qfont, Qglobal); return Qnil; }