Seiji Zenitani
zenit****@users*****
2006年 8月 11日 (金) 23:10:22 JST
Index: CarbonEmacsPackage/GPL/lisp/carbon-emacs-package.el diff -u CarbonEmacsPackage/GPL/lisp/carbon-emacs-package.el:1.24 CarbonEmacsPackage/GPL/lisp/carbon-emacs-package.el:1.25 --- CarbonEmacsPackage/GPL/lisp/carbon-emacs-package.el:1.24 Tue Aug 8 23:29:06 2006 +++ CarbonEmacsPackage/GPL/lisp/carbon-emacs-package.el Fri Aug 11 23:10:22 2006 @@ -79,7 +79,6 @@ ;; variables -(defvar carbon-emacs-package-alpha 1.0 "The default window opacity.") (defvar carbon-emacs-package-carbon-font-enabled nil) (defconst carbon-emacs-package-netinstall-on (and (file-exists-p "/usr/bin/make") @@ -120,18 +119,6 @@ ))) )) -(defun carbon-emacs-package-set-alpha (alpha) - (interactive) - (setq carbon-emacs-package-alpha alpha) - (set-active-alpha alpha) - (set-inactive-alpha alpha) - ) -(defun carbon-emacs-package-set-alpha-by-percent (&optional alpha) - (interactive "nWindow Opacity (0-100%%): ") - (if (and (<= 0 alpha) (<= alpha 100)) - (let ((a (/ alpha 100.0))) - (carbon-emacs-package-set-alpha a)))) - (defvar carbon-emacs-package-map (make-sparse-keymap "Carbon Emacs Package Menu") "Keymap for Carbon Emacs Package Menu.") @@ -162,31 +149,7 @@ ["OSX Native Input Method" (mac-input-method-mode) :style toggle :selected mac-input-method-mode] - ("Window Opacity" - ["100 %" (carbon-emacs-package-set-alpha 1.0) - :style toggle :selected (= carbon-emacs-package-alpha 1.0) ] - ["90" (carbon-emacs-package-set-alpha 0.9) - :style toggle :selected (= carbon-emacs-package-alpha 0.9) ] - ["80" (carbon-emacs-package-set-alpha 0.8) - :style toggle :selected (= carbon-emacs-package-alpha 0.8) ] - ["70" (carbon-emacs-package-set-alpha 0.7) - :style toggle :selected (= carbon-emacs-package-alpha 0.7) ] - ["60" (carbon-emacs-package-set-alpha 0.6) - :style toggle :selected (= carbon-emacs-package-alpha 0.6) ] - ["50" (carbon-emacs-package-set-alpha 0.5) - :style toggle :selected (= carbon-emacs-package-alpha 0.5) ] - ["40" (carbon-emacs-package-set-alpha 0.4) - :style toggle :selected (= carbon-emacs-package-alpha 0.4) ] - ["30" (carbon-emacs-package-set-alpha 0.3) - :style toggle :selected (= carbon-emacs-package-alpha 0.3) ] - ["20" (carbon-emacs-package-set-alpha 0.2) - :style toggle :selected (= carbon-emacs-package-alpha 0.2) ] - ["10" (carbon-emacs-package-set-alpha 0.1) - :style toggle :selected (= carbon-emacs-package-alpha 0.1) ] - ["0" (carbon-emacs-package-set-alpha 0.0) - :style toggle :selected (= carbon-emacs-package-alpha 0.0) ] - ["Set..." (call-interactively 'carbon-emacs-package-set-alpha-by-percent) t] - ) + ["Window Opacity..." (mac-transparency-dialog) t] ["--" nil nil] ["Save Changes..." (when (mac-dialog-y-or-n-p @@ -195,7 +158,8 @@ (dolist (elt `( - ("WindowAlpha" . carbon-emacs-package-alpha) + ("ActiveAlpha" . ,(frame-parameter nil 'active-alpha)) + ("InactiveAlpha" . ,(frame-parameter nil 'inactive-alpha)) ("MacKeyModeEnabled" . mac-key-mode) ("MacPrintModeEnabled" . mac-print-mode) ("FixedWidthFontset" . carbon-emacs-package-carbon-font-enabled) @@ -203,7 +167,10 @@ ,(equal default-input-method "MacOSX")) )) (let ((key (car elt)) - (value (if (boundp (cdr elt)) (eval (cdr elt)) "NO"))) + (value (cond + ((numberp (cdr elt)) (cdr elt)) + ((boundp (cdr elt)) (eval (cdr elt))) + (t "NO")))) (shell-command (concat "defaults write CarbonEmacsPackage " key " " (cond @@ -221,14 +188,18 @@ t] ["--" nil nil] ("Net-Install" + ["Howm" + (carbon-emacs-package-netinstall + "http://macemacsjp.sourceforge.jp/package/netinstall/howm.tgz") + carbon-emacs-package-netinstall-on] ["Lookup" (carbon-emacs-package-netinstall "http://macemacsjp.sourceforge.jp/package/netinstall/lookup.tgz") carbon-emacs-package-netinstall-on] - ["Howm" + ["Navi2ch" (carbon-emacs-package-netinstall - "http://macemacsjp.sourceforge.jp/package/netinstall/howm.tgz") - carbon-emacs-package-netinstall-on] + "http://macemacsjp.sourceforge.jp/package/netinstall/navi2ch.tgz") + nil] ["Riece" (carbon-emacs-package-netinstall "http://macemacsjp.sourceforge.jp/package/netinstall/riece.tgz")