我有一个抄自spacemacs的设置透明度函数:
(defun remx/set-transparency (value &optional frame)
"Set transparency to VALUE for FRAME.
VALUE is a pair of active and inactive transparency values
between 0-100 (where 0 is transparent and 100 is opaque).
If FRAME is nil, it defaults to the selected frame."
(interactive "nTransparency (0 is transparent - 100 is opaque): ")
(set-frame-parameter frame 'alpha (cons value value)))
今天我越看越觉得别扭……觉得它应该叫set-opacity
……但是此函数还是透明度开启的函数,叫“不透明度”也不合适……
于是我又来问了…… 目前我想到一种解决方法就是……把函数改造成这样,不改名字:
(defun remx/set-transparency (value &optional frame)
"Set transparency to VALUE for FRAME.
VALUE is a pair of active and inactive transparency values
between 0-100 (where 0 is opaque and 100 is transparent).
If FRAME is nil, it defaults to the selected frame."
(interactive "nTransparency (0 is opaque - 100 is transparent): ")
(set-frame-parameter frame 'alpha (cons (- 100 value) (- 100 value))))
……各位觉得我该怎么改?前提是不动这个函数的功能。