diff options
| author | Vedang Manerikar <ved.manerikar@gmail.com> | 2022-10-07 19:51:29 +0530 |
|---|---|---|
| committer | Vedang Manerikar <ved.manerikar@gmail.com> | 2022-10-10 15:39:23 +0530 |
| commit | ce5ed3412d016641e1bfce72a1304fd2c303fc1d (patch) | |
| tree | 86cd60f1e496a37e5b76fd5a21eaa87e9cbb4b97 | |
| parent | 5563ac911466ee8948b76241d22c5c0e384b9ab4 (diff) | |
Remove macro / function re-definitions
Rely on the functions that come built into Emacs.
Relates to: #26
| -rw-r--r-- | lisp/pdf-util.el | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lisp/pdf-util.el b/lisp/pdf-util.el index cfc77d3..ebf7ccf 100644 --- a/lisp/pdf-util.el +++ b/lisp/pdf-util.el @@ -43,37 +43,6 @@ ;; * Compatibility with older Emacssen (< 25.1) ;; * ================================================================== * -;; The with-file-modes macro is only available in recent Emacs -;; versions. -(eval-when-compile - (unless (fboundp 'with-file-modes) - (defmacro with-file-modes (modes &rest body) - "Execute BODY with default file permissions temporarily set to MODES. -MODES is as for `set-default-file-modes'." - (declare (indent 1) (debug t)) - (let ((umask (make-symbol "umask"))) - `(let ((,umask (default-file-modes))) - (unwind-protect - (progn - (set-default-file-modes ,modes) - ,@body) - (set-default-file-modes ,umask))))))) - -(unless (fboundp 'alist-get) ;;25.1 - (defun alist-get (key alist &optional default remove) - "Get the value associated to KEY in ALIST. -DEFAULT is the value to return if KEY is not found in ALIST. -REMOVE, if non-nil, means that when setting this element, we should -remove the entry if the new value is `eql' to DEFAULT." - (ignore remove) ;;Silence byte-compiler. - (let ((x (assq key alist))) - (if x (cdr x) default)))) - -(require 'register) -(unless (fboundp 'register-read-with-preview) - (defalias 'register-read-with-preview #'read-char - "Compatibility alias for pdf-tools.")) - ;; In Emacs 24.3 window-width does not have a PIXELWISE argument. (defmacro pdf-util-window-pixel-width (&optional window) "Return the width of WINDOW in pixel." |
