Reputation: 13996
How do I install zoom-frm.el in Emacs to get zoom by mouse-wheel?
I want to install zoom-frm.el to Emacs, so I've downloaded the file and placed it inside .emacs.d.
Now the file says to place (require 'zoom-frm) inside init.el, however I get the error message "Cannot open file or directory zoom-frm".
Can someone provide some details on how to install this "addon" and set it up for proper behaviour to a novice?
Thanks,
Upvotes: 2
Views: 653
Reputation: 30708
Put the library (file zoom-frm.el
) and any libraries it requires (look in the file for "(require
") inside a folder (directory) that is in your load-path
.
The libraries required by zoom-frm.el
are: frame-cmds.el
and frame-fns.el
. zoom-frm.el
requires frame-cmds.el
and frame-cmds.el
requires frame-fns.el
. Put all three libraries in a folder that is in your load-path
.
(Library frame-cmds.el
can also make use of libraries strings.el
and misc-fns.el
, but they are not strictly required. Their (require
...)
expressions end in nil t)
, which means that these libraries are "soft-required": nice to have but not strictly required.)
Put (require 'zoom-frm)
in your init file, after the part of your init file where you define your load-path
.
To get mouse-wheel zooming, follow the instructions in zoom-frm.el
:
(define-key ctl-x-map [(control ?+)] 'zoom-in/out)
(define-key ctl-x-map [(control ?-)] 'zoom-in/out)
(define-key ctl-x-map [(control ?=)] 'zoom-in/out)
(define-key ctl-x-map [(control ?0)] 'zoom-in/out)
(global-set-key (vector (list 'control mouse-wheel-down-event)) 'zoom-in)
(global-set-key (vector (list 'control mouse-wheel-up-event)) 'zoom-out))
(global-set-key [S-mouse-1] 'zoom-in)
(global-set-key [C-S-mouse-1] 'zoom-out)
;; Get rid of `mouse-set-font' or `mouse-appearance-menu':
(global-set-key [S-down-mouse-1] nil)
See the Emacs manual, node Load Libraries for more information, including about load-path
. You owe it to yourself to become familiar with this information, as it is basic information about requiring (loading) any library.
You can also install zoom-frm.el
using the Emacs package system with MELPA.
Upvotes: 1