comparison lisp/printing.el @ 90650:02cf29720f31

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 490-504) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 161-163) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-130
author Miles Bader <miles@gnu.org>
date Tue, 07 Nov 2006 23:22:48 +0000
parents bb0e318b7c53 81ee79a96310
children dbe3f29e61d6
comparison
equal deleted inserted replaced
90649:d53934e7ddef 90650:02cf29720f31
1142 1142
1143 (defun pr-alist-custom-set (symbol value) 1143 (defun pr-alist-custom-set (symbol value)
1144 "Set the value of custom variables for printer & utility selection." 1144 "Set the value of custom variables for printer & utility selection."
1145 (set symbol value) 1145 (set symbol value)
1146 (and (featurep 'printing) ; update only after printing is loaded 1146 (and (featurep 'printing) ; update only after printing is loaded
1147 (not pr-menu-print-item)
1147 (pr-update-menus t))) 1148 (pr-update-menus t)))
1148 1149
1149 1150
1150 (defun pr-ps-utility-custom-set (symbol value) 1151 (defun pr-ps-utility-custom-set (symbol value)
1151 "Update utility menu entry." 1152 "Update utility menu entry."
1152 (set symbol value) 1153 (set symbol value)
1153 (and (featurep 'printing) ; update only after printing is loaded 1154 (and (featurep 'printing) ; update only after printing is loaded
1155 (not pr-menu-print-item)
1154 (pr-menu-set-utility-title value))) 1156 (pr-menu-set-utility-title value)))
1155 1157
1156 1158
1157 (defun pr-ps-name-custom-set (symbol value) 1159 (defun pr-ps-name-custom-set (symbol value)
1158 "Update `PostScript Printer:' menu entry." 1160 "Update `PostScript Printer:' menu entry."
1159 (set symbol value) 1161 (set symbol value)
1160 (and (featurep 'printing) ; update only after printing is loaded 1162 (and (featurep 'printing) ; update only after printing is loaded
1163 (not pr-menu-print-item)
1161 (pr-menu-set-ps-title value))) 1164 (pr-menu-set-ps-title value)))
1162 1165
1163 1166
1164 (defun pr-txt-name-custom-set (symbol value) 1167 (defun pr-txt-name-custom-set (symbol value)
1165 "Update `Text Printer:' menu entry." 1168 "Update `Text Printer:' menu entry."
1166 (set symbol value) 1169 (set symbol value)
1167 (and (featurep 'printing) ; update only after printing is loaded 1170 (and (featurep 'printing) ; update only after printing is loaded
1171 (not pr-menu-print-item)
1168 (pr-menu-set-txt-title value))) 1172 (pr-menu-set-txt-title value)))
1169 1173
1170 1174
1171 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1175 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1172 ;; User Interface (I) 1176 ;; User Interface (I)
3094 (setq pr-menu-print-item nil 3098 (setq pr-menu-print-item nil
3095 pr-menu-bar (vector 'menu-bar 'tools 3099 pr-menu-bar (vector 'menu-bar 'tools
3096 (pr-get-symbol "Printing"))))) 3100 (pr-get-symbol "Printing")))))
3097 ;; Emacs 21 & 22 3101 ;; Emacs 21 & 22
3098 (t 3102 (t
3099 (let* ((has-file (lookup-key global-map (vector 'menu-bar 'file))) 3103 (cond
3100 (item-file (if has-file '("file") '("files")))) 3104 (pr-menu-print-item
3101 (cond 3105 (easy-menu-add-item menu-bar-file-menu nil
3102 (pr-menu-print-item 3106 (easy-menu-create-menu "Print" pr-menu-spec)
3103 (easy-menu-change item-file "Print" pr-menu-spec "print-buffer") 3107 "print-buffer")
3104 (let ((items '("print-buffer" "print-region" 3108 (dolist (item '("print-buffer" "print-region"
3105 "ps-print-buffer-faces" "ps-print-region-faces" 3109 "ps-print-buffer-faces" "ps-print-region-faces"
3106 "ps-print-buffer" "ps-print-region"))) 3110 "ps-print-buffer" "ps-print-region"))
3107 (while items 3111 (easy-menu-remove-item menu-bar-file-menu nil item))
3108 (easy-menu-remove-item nil item-file (car items)) 3112 (setq pr-menu-print-item nil
3109 (setq items (cdr items))) 3113 pr-menu-bar (vector 'menu-bar
3110 (setq pr-menu-print-item nil 3114 'file
3111 pr-menu-bar (vector 'menu-bar 3115 (pr-get-symbol "Print"))))
3112 (if has-file 'file 'files) 3116 (t
3113 (pr-get-symbol "Print"))))) 3117 (easy-menu-change '("file") "Print" pr-menu-spec)))))))
3114 (t
3115 (easy-menu-change item-file "Print" pr-menu-spec))))))))
3116 (pr-update-menus t)) 3118 (pr-update-menus t))
3117 3119
3118 3120
3119 ;; Key binding 3121 ;; Key binding
3120 (let ((pr-print-key (if (featurep 'xemacs) 3122 (let ((pr-print-key (if (featurep 'xemacs)