68 lines
2.6 KiB
EmacsLisp
68 lines
2.6 KiB
EmacsLisp
;;; init-eaf.el --- -*- lexical-binding: t -*-
|
|
;;
|
|
;; Filename: init-eaf.el
|
|
;; Description: Initialize Emacs Application Framework
|
|
;; Author: Mingde (Matthew) Zeng
|
|
;; Copyright (C) 2019 Mingde (Matthew) Zeng
|
|
;; Created: Tue Jun 4 00:26:09 2019 (-0400)
|
|
;; Version: 2.0.0
|
|
;; Last-Updated: Fri Dec 27 22:07:41 2019 (-0500)
|
|
;; By: Mingde (Matthew) Zeng
|
|
;; URL: https://github.com/MatthewZMD/.emacs.d
|
|
;; Keywords: M-EMACS .emacs.d pdf-tools
|
|
;; Compatibility: emacs-version >= 26.1
|
|
;;
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;
|
|
;;; Commentary:
|
|
;;
|
|
;; This initializes Emacs Application Framework
|
|
;;
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;
|
|
;; This program is free software: you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation, either version 3 of the License, or (at
|
|
;; your option) any later version.
|
|
;;
|
|
;; This program is distributed in the hope that it will be useful, but
|
|
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
;; General Public License for more details.
|
|
;;
|
|
;; You should have received a copy of the GNU General Public License
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
|
;;
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;
|
|
;;; Code:
|
|
|
|
(eval-when-compile
|
|
(require 'init-const))
|
|
|
|
;; EAFPac
|
|
(use-package eaf
|
|
:load-path (lambda () (expand-file-name "site-elisp/emacs-application-framework" user-emacs-directory))
|
|
:if *eaf-env*
|
|
:custom
|
|
(eaf-find-alternate-file-in-dired t)
|
|
(browse-url-browser-function 'eaf-open-browser) ;; Make EAF Browser my default browser
|
|
:config
|
|
(defalias 'browse-web #'eaf-open-browser)
|
|
;; I already bind "RET", "<mouse-2>", "^" to `dired-find-alternate-file' in `init-dired.el'.
|
|
;; Comment this line out of you don't want to use EAF to open available files in dired.
|
|
;; (global-set-key [remap dired-find-alternate-file] #'eaf-file-open-in-dired)
|
|
(eaf-bind-key scroll_up "RET" eaf-pdf-viewer-keybinding)
|
|
(eaf-bind-key scroll_down_page "DEL" eaf-pdf-viewer-keybinding)
|
|
(eaf-bind-key scroll_down_page "u" eaf-pdf-viewer-keybinding)
|
|
(eaf-bind-key scroll_up_page "d" eaf-pdf-viewer-keybinding)
|
|
(eaf-bind-key scroll_to_end "M->" eaf-pdf-viewer-keybinding)
|
|
(eaf-bind-key scroll_to_home "M-<" eaf-pdf-viewer-keybinding)
|
|
(eaf-bind-key quit-window "q" eaf-pdf-viewer-keybinding)
|
|
(eaf-bind-key take_photo "p" eaf-camera-keybinding))
|
|
;; -EAFPac
|
|
|
|
(provide 'init-eaf)
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;; init-eaf.el ends here
|