update packages

This commit is contained in:
2022-01-04 21:35:17 +01:00
parent 1d5275c946
commit 8de00e5202
700 changed files with 42441 additions and 85378 deletions

View File

@@ -1,12 +1,14 @@
;;; pdf-tools.el --- Support library for PDF documents. -*- lexical-binding:t -*-
;;; pdf-tools.el --- Support library for PDF documents -*- lexical-binding:t -*-
;; Copyright (C) 2013, 2014 Andreas Politz
;; Author: Andreas Politz <politza@fh-trier.de>
;; Author: Andreas Politz <mail@andreas-politz.de>
;; Maintainer: Vedang Manerikar <vedang.manerikar@gmail.com>
;; URL: http://github.com/vedang/pdf-tools/
;; Keywords: files, multimedia
;; Package: pdf-tools
;; Version: 1.0
;; Package-Requires: ((emacs "24.3") (tablist "1.0") (let-alist "1.0.4"))
;; Version: 1.0.0snapshot
;; Package-Requires: ((emacs "24.3") (nadvice "0.3") (tablist "1.0") (let-alist "1.0.4"))
;; 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
@@ -28,8 +30,11 @@
;; e.g. ghostscript and stored in the file-system, but rather created
;; on-demand and stored in memory.
;;
;; Note: This package requires external libraries and works currently
;; only on GNU/Linux systems.
;; Note: This package is built and tested on GNU/Linux systems. It
;; works on macOS and Windows, but is officially supported only on
;; GNU/Linux systems. This package will not make macOS or Windows
;; specific functionality changes, behaviour on these systems is
;; provided as-is.
;;
;; Note: If you ever update it, you need to restart Emacs afterwards.
;;
@@ -68,7 +73,7 @@
;; back to the PDF file.
;;
;; * Attachments
;; Save files attached to the PDF-file or list them in a dired buffer.
;; Save files attached to the PDF-file or list them in a Dired buffer.
;;
;; * Outline
;; Use imenu or a special buffer to examine and navigate the PDF's
@@ -303,10 +308,11 @@ Returns the buffer of the compilation process."
(unless callback (setq callback #'ignore))
(unless build-directory
(setq build-directory (pdf-tools-locate-build-directory)))
(cl-check-type target-directory file-directory)
(cl-check-type target-directory (satisfies file-directory-p))
(setq target-directory (file-name-as-directory
(expand-file-name target-directory)))
(cl-check-type build-directory (and (not null) file-directory))
(cl-check-type build-directory (and (not null)
(satisfies file-directory-p)))
(when (and skip-dependencies-p force-dependencies-p)
(error "Can't simultaneously skip and force dependencies"))
(let* ((compilation-auto-jump-to-first-error nil)
@@ -424,7 +430,7 @@ See `pdf-view-mode' and `pdf-tools-enabled-modes'."
(when (memq 'pdf-virtual-global-minor-mode
pdf-tools-enabled-modes)
(pdf-virtual-global-minor-mode 1))
(add-hook 'pdf-view-mode-hook 'pdf-tools-enable-minor-modes)
(add-hook 'pdf-view-mode-hook #'pdf-tools-enable-minor-modes)
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (and (not (derived-mode-p 'pdf-view-mode))
@@ -442,7 +448,7 @@ See `pdf-view-mode' and `pdf-tools-enabled-modes'."
(remove pdf-tools-magic-mode-alist-entry magic-mode-alist))
(pdf-occur-global-minor-mode -1)
(pdf-virtual-global-minor-mode -1)
(remove-hook 'pdf-view-mode-hook 'pdf-tools-enable-minor-modes)
(remove-hook 'pdf-view-mode-hook #'pdf-tools-enable-minor-modes)
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (pdf-util-pdf-buffer-p buf)
@@ -450,7 +456,9 @@ See `pdf-view-mode' and `pdf-tools-enabled-modes'."
(normal-mode)))))
(defun pdf-tools-pdf-buffer-p (&optional buffer)
"Return non-nil if BUFFER contains a PDF document."
"Check if the current buffer is a PDF document.
Optionally, take BUFFER as an argument and check if it is a PDF document."
(save-current-buffer
(when buffer (set-buffer buffer))
(save-excursion
@@ -460,10 +468,14 @@ See `pdf-view-mode' and `pdf-tools-enabled-modes'."
(looking-at "%PDF")))))
(defun pdf-tools-assert-pdf-buffer (&optional buffer)
"Throw an error if the current BUFFER does not contain a PDF document."
(unless (pdf-tools-pdf-buffer-p buffer)
(error "Buffer does not contain a PDF document")))
(defun pdf-tools-set-modes-enabled (enable &optional modes)
"Enable/Disable all the pdf-tools modes on the current buffer based on ENABLE.
Accepts MODES as a optional argument to enable/disable specific modes."
(dolist (m (or modes pdf-tools-enabled-modes))
(let ((enabled-p (and (boundp m)
(symbol-value m))))
@@ -493,6 +505,7 @@ MODES defaults to `pdf-tools-enabled-modes'."
;;;###autoload
(defun pdf-tools-help ()
"Show a Help buffer for `pdf-tools'."
(interactive)
(help-setup-xref (list #'pdf-tools-help)
(called-interactively-p 'interactive))
@@ -500,7 +513,7 @@ MODES defaults to `pdf-tools-enabled-modes'."
(princ "PDF Tools Help\n\n")
(princ " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n")
(dolist (m (cons 'pdf-view-mode
(sort (copy-sequence pdf-tools-modes) 'string<)))
(sort (copy-sequence pdf-tools-modes) #'string<)))
(princ (format "`%s' is " m))
(describe-function-1 m)
(terpri) (terpri)
@@ -515,6 +528,7 @@ MODES defaults to `pdf-tools-enabled-modes'."
"Non-nil, if debugging PDF Tools.")
(defun pdf-tools-toggle-debug ()
"Turn debugging on/off for pdf-tools."
(interactive)
(setq pdf-tools-debug (not pdf-tools-debug))
(when (called-interactively-p 'any)