diff options
| author | Vinicius Jose Latorre | 2006-11-08 14:04:09 +0000 |
|---|---|---|
| committer | Vinicius Jose Latorre | 2006-11-08 14:04:09 +0000 |
| commit | 0695be6f01b625daca0103266a63c446709cff8e (patch) | |
| tree | f0ebd1ea31b16d75d495fda638ce0c82e87d3507 | |
| parent | f8061cecca58d673955d0668f6b1ffd4f81ffb9b (diff) | |
| download | emacs-0695be6f01b625daca0103266a63c446709cff8e.tar.gz emacs-0695be6f01b625daca0103266a63c446709cff8e.zip | |
Fix Print submenu creation
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/printing.el | 51 |
2 files changed, 34 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0c90074f84e..85b188ff581 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2006-11-08 Vinicius Jose Latorre <viniciusjl@ig.com.br> | ||
| 2 | |||
| 3 | * printing.el (pr-alist-custom-set, pr-ps-utility-custom-set) | ||
| 4 | (pr-ps-name-custom-set, pr-txt-name-custom-set): Return back the old | ||
| 5 | behaviour. | ||
| 6 | (pr-menu-bind): Act on global-map instead of menu-bar-file-menu | ||
| 7 | directly. | ||
| 8 | |||
| 1 | 2006-11-08 Juanma Barranquero <lekktu@gmail.com> | 9 | 2006-11-08 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 10 | ||
| 3 | * ido.el (ido-ignore-extensions, ido-show-dot-for-dired) | 11 | * ido.el (ido-ignore-extensions, ido-show-dot-for-dired) |
diff --git a/lisp/printing.el b/lisp/printing.el index 508d0bde585..d99d6985af4 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 8 | ;; Time-stamp: <2006/09/15 18:53:14 vinicius> | 8 | ;; Time-stamp: <2006/11/08 12:01:50 vinicius> |
| 9 | ;; Keywords: wp, print, PostScript | 9 | ;; Keywords: wp, print, PostScript |
| 10 | ;; Version: 6.8.4 | 10 | ;; Version: 6.8.4 |
| 11 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre | 11 | ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
| @@ -68,7 +68,7 @@ Please send all bug fixes and enhancements to | |||
| 68 | ;; interface to ps-print package and it also provides some extra stuff. | 68 | ;; interface to ps-print package and it also provides some extra stuff. |
| 69 | ;; | 69 | ;; |
| 70 | ;; To download the latest ps-print package see | 70 | ;; To download the latest ps-print package see |
| 71 | ;; `http://www.cpqd.com.br/~vinicius/emacs/ps-print.tar.gz'. | 71 | ;; `http://www.emacswiki.org/cgi-bin/emacs/download/ps-print.tar.gz'. |
| 72 | ;; Please, see README file for ps-print installation instructions. | 72 | ;; Please, see README file for ps-print installation instructions. |
| 73 | ;; | 73 | ;; |
| 74 | ;; `printing' was inspired on: | 74 | ;; `printing' was inspired on: |
| @@ -958,8 +958,8 @@ Please send all bug fixes and enhancements to | |||
| 958 | ;; | 958 | ;; |
| 959 | ;; * For `printing' package: | 959 | ;; * For `printing' package: |
| 960 | ;; | 960 | ;; |
| 961 | ;; printing `http://www.cpqd.com.br/~vinicius/emacs/printing.el.gz' | 961 | ;; printing `http://www.emacswiki.org/cgi-bin/emacs/download/printing.el' |
| 962 | ;; ps-print `http://www.cpqd.com.br/~vinicius/emacs/ps-print.tar.gz' | 962 | ;; ps-print `http://www.emacswiki.org/cgi-bin/emacs/download/ps-print.tar.gz' |
| 963 | ;; | 963 | ;; |
| 964 | ;; * For GNU or Unix system: | 964 | ;; * For GNU or Unix system: |
| 965 | ;; | 965 | ;; |
| @@ -1144,7 +1144,6 @@ If SUFFIX is non-nil, add that at the end of the file name." | |||
| 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) | ||
| 1148 | (pr-update-menus t))) | 1147 | (pr-update-menus t))) |
| 1149 | 1148 | ||
| 1150 | 1149 | ||
| @@ -1152,7 +1151,6 @@ If SUFFIX is non-nil, add that at the end of the file name." | |||
| 1152 | "Update utility menu entry." | 1151 | "Update utility menu entry." |
| 1153 | (set symbol value) | 1152 | (set symbol value) |
| 1154 | (and (featurep 'printing) ; update only after printing is loaded | 1153 | (and (featurep 'printing) ; update only after printing is loaded |
| 1155 | (not pr-menu-print-item) | ||
| 1156 | (pr-menu-set-utility-title value))) | 1154 | (pr-menu-set-utility-title value))) |
| 1157 | 1155 | ||
| 1158 | 1156 | ||
| @@ -1160,7 +1158,6 @@ If SUFFIX is non-nil, add that at the end of the file name." | |||
| 1160 | "Update `PostScript Printer:' menu entry." | 1158 | "Update `PostScript Printer:' menu entry." |
| 1161 | (set symbol value) | 1159 | (set symbol value) |
| 1162 | (and (featurep 'printing) ; update only after printing is loaded | 1160 | (and (featurep 'printing) ; update only after printing is loaded |
| 1163 | (not pr-menu-print-item) | ||
| 1164 | (pr-menu-set-ps-title value))) | 1161 | (pr-menu-set-ps-title value))) |
| 1165 | 1162 | ||
| 1166 | 1163 | ||
| @@ -1168,7 +1165,6 @@ If SUFFIX is non-nil, add that at the end of the file name." | |||
| 1168 | "Update `Text Printer:' menu entry." | 1165 | "Update `Text Printer:' menu entry." |
| 1169 | (set symbol value) | 1166 | (set symbol value) |
| 1170 | (and (featurep 'printing) ; update only after printing is loaded | 1167 | (and (featurep 'printing) ; update only after printing is loaded |
| 1171 | (not pr-menu-print-item) | ||
| 1172 | (pr-menu-set-txt-title value))) | 1168 | (pr-menu-set-txt-title value))) |
| 1173 | 1169 | ||
| 1174 | 1170 | ||
| @@ -3091,7 +3087,7 @@ Calls `pr-update-menus' to adjust menus." | |||
| 3091 | ;; third... time, but "print" item exists only in the first load. | 3087 | ;; third... time, but "print" item exists only in the first load. |
| 3092 | (cond | 3088 | (cond |
| 3093 | ;; Emacs 20 | 3089 | ;; Emacs 20 |
| 3094 | ((string< emacs-version "21.") | 3090 | ((< emacs-major-version 21) |
| 3095 | (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) | 3091 | (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) |
| 3096 | (when pr-menu-print-item | 3092 | (when pr-menu-print-item |
| 3097 | (easy-menu-remove-item nil '("tools") pr-menu-print-item) | 3093 | (easy-menu-remove-item nil '("tools") pr-menu-print-item) |
| @@ -3100,21 +3096,24 @@ Calls `pr-update-menus' to adjust menus." | |||
| 3100 | (pr-get-symbol "Printing"))))) | 3096 | (pr-get-symbol "Printing"))))) |
| 3101 | ;; Emacs 21 & 22 | 3097 | ;; Emacs 21 & 22 |
| 3102 | (t | 3098 | (t |
| 3103 | (cond | 3099 | (let ((menu-file (if (= emacs-major-version 21) |
| 3104 | (pr-menu-print-item | 3100 | '("menu-bar" "files") ; Emacs 21 |
| 3105 | (easy-menu-add-item menu-bar-file-menu nil | 3101 | '("menu-bar" "file")))) ; Emacs 22 or higher |
| 3106 | (easy-menu-create-menu "Print" pr-menu-spec) | 3102 | (cond |
| 3107 | "print-buffer") | 3103 | (pr-menu-print-item |
| 3108 | (dolist (item '("print-buffer" "print-region" | 3104 | (easy-menu-add-item global-map menu-file |
| 3109 | "ps-print-buffer-faces" "ps-print-region-faces" | 3105 | (easy-menu-create-menu "Print" pr-menu-spec) |
| 3110 | "ps-print-buffer" "ps-print-region")) | 3106 | "print-buffer") |
| 3111 | (easy-menu-remove-item menu-bar-file-menu nil item)) | 3107 | (dolist (item '("print-buffer" "print-region" |
| 3112 | (setq pr-menu-print-item nil | 3108 | "ps-print-buffer-faces" "ps-print-region-faces" |
| 3113 | pr-menu-bar (vector 'menu-bar | 3109 | "ps-print-buffer" "ps-print-region")) |
| 3114 | 'file | 3110 | (easy-menu-remove-item global-map menu-file item)) |
| 3115 | (pr-get-symbol "Print")))) | 3111 | (setq pr-menu-print-item nil |
| 3116 | (t | 3112 | pr-menu-bar (vector 'menu-bar |
| 3117 | (easy-menu-change '("file") "Print" pr-menu-spec))))))) | 3113 | (pr-get-symbol (nth 1 menu-file)) |
| 3114 | (pr-get-symbol "Print")))) | ||
| 3115 | (t | ||
| 3116 | (easy-menu-change (cdr menu-file) "Print" pr-menu-spec)))))))) | ||
| 3118 | (pr-update-menus t)) | 3117 | (pr-update-menus t)) |
| 3119 | 3118 | ||
| 3120 | 3119 | ||
| @@ -6056,7 +6055,9 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." | |||
| 6056 | ;; header | 6055 | ;; header |
| 6057 | (let ((versions (concat "printing v" pr-version | 6056 | (let ((versions (concat "printing v" pr-version |
| 6058 | " ps-print v" ps-print-version))) | 6057 | " ps-print v" ps-print-version))) |
| 6059 | (widget-insert (make-string (- 79 (length versions)) ?\s) versions)) | 6058 | ;; to keep compatibility with Emacs 20 & 21: |
| 6059 | ;; DO NOT REPLACE `?\ ' BY `?\s' | ||
| 6060 | (widget-insert (make-string (- 79 (length versions)) ?\ ) versions)) | ||
| 6060 | (pr-insert-italic "\nCurrent Directory : " 1) | 6061 | (pr-insert-italic "\nCurrent Directory : " 1) |
| 6061 | (pr-insert-italic default-directory) | 6062 | (pr-insert-italic default-directory) |
| 6062 | 6063 | ||