diff options
| author | Andreas Politz <politza@hochschule-trier.de> | 2018-10-27 18:23:25 +0200 |
|---|---|---|
| committer | Andreas Politz <politza@hochschule-trier.de> | 2018-10-27 18:23:25 +0200 |
| commit | b6c0e4f3bb8d57818c51f27c12b9235d39bec8d3 (patch) | |
| tree | dfb26c5d433dbe31e5d5029e65b4a64e532c8a21 /lisp | |
| parent | 08001d6188eb29e2d21b494be4aa516a6971af01 (diff) | |
Fix indentation
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/pdf-annot.el | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/lisp/pdf-annot.el b/lisp/pdf-annot.el index 3def6ab..b0ff3c2 100644 --- a/lisp/pdf-annot.el +++ b/lisp/pdf-annot.el @@ -1187,7 +1187,7 @@ See also `pdf-annot-add-markup-annotation'." (pdf-annot-add-markup-annotation list-of-edges 'underline color property-alist)) (defun pdf-annot-add-strikeout-markup-annotation (list-of-edges - &optional color property-alist) + &optional color property-alist) "Add a new strike-out annotation in the selected window. See also `pdf-annot-add-markup-annotation'." @@ -1195,7 +1195,7 @@ See also `pdf-annot-add-markup-annotation'." (pdf-annot-add-markup-annotation list-of-edges 'strike-out color property-alist)) (defun pdf-annot-add-highlight-markup-annotation (list-of-edges - &optional color property-alist) + &optional color property-alist) "Add a new highlight annotation in the selected window. See also `pdf-annot-add-markup-annotation'." @@ -1523,10 +1523,10 @@ desired column-width. Currently supported properties are page, type, label, date and contents." :type '(alist :key-type (symbol)) :options '((page (integer :value 3 :tag "Column Width")) - (type (integer :value 10 :tag "Column Width" )) - (label (integer :value 24 :tag "Column Width")) - (date (integer :value 24 :tag "Column Width")) - (contents (integer :value 56 :tag "Column Width"))) + (type (integer :value 10 :tag "Column Width" )) + (label (integer :value 24 :tag "Column Width")) + (date (integer :value 24 :tag "Column Width")) + (contents (integer :value 56 :tag "Column Width"))) :group 'pdf-annot) (defcustom pdf-annot-list-highlight-type nil @@ -1582,68 +1582,68 @@ belong to the same page and A1 is displayed above/left of A2." (defun pdf-annot--make-entry-formatter (a) (lambda (fmt) - (let ((entry-type (car fmt)) - (entry-width (cdr fmt)) - ;; Taken from css-mode.el - (contrasty-color - (lambda (name) - (if (> (color-distance name "black") 292485) - "black" "white"))) - (prune-newlines - (lambda (str) - (replace-regexp-in-string "\n" " " str t t)))) - (cl-ecase entry-type - (date (pdf-annot-print-property a 'modified)) - (page (pdf-annot-print-property a 'page)) - (label (funcall prune-newlines - (pdf-annot-print-property a 'label))) - (contents - (truncate-string-to-width - (funcall prune-newlines - (pdf-annot-print-property a 'contents)) - entry-width)) - (type - (let ((color (pdf-annot-get a 'color)) - (type (pdf-annot-print-property a 'type))) - (if pdf-annot-list-highlight-type - (propertize - type 'face - `(:background ,color - :foreground ,(funcall contrasty-color color))) - type))))))) + (let ((entry-type (car fmt)) + (entry-width (cdr fmt)) + ;; Taken from css-mode.el + (contrasty-color + (lambda (name) + (if (> (color-distance name "black") 292485) + "black" "white"))) + (prune-newlines + (lambda (str) + (replace-regexp-in-string "\n" " " str t t)))) + (cl-ecase entry-type + (date (pdf-annot-print-property a 'modified)) + (page (pdf-annot-print-property a 'page)) + (label (funcall prune-newlines + (pdf-annot-print-property a 'label))) + (contents + (truncate-string-to-width + (funcall prune-newlines + (pdf-annot-print-property a 'contents)) + entry-width)) + (type + (let ((color (pdf-annot-get a 'color)) + (type (pdf-annot-print-property a 'type))) + (if pdf-annot-list-highlight-type + (propertize + type 'face + `(:background ,color + :foreground ,(funcall contrasty-color color))) + type))))))) (defun pdf-annot-list-create-entry (a) "Create a `tabulated-list-entries' entry for annotation A." (list (pdf-annot-get-id a) (vconcat - (mapcar (pdf-annot--make-entry-formatter a) - pdf-annot-list-format)))) + (mapcar (pdf-annot--make-entry-formatter a) + pdf-annot-list-format)))) (define-derived-mode pdf-annot-list-mode tablist-mode "Annots" (let* ((page-sorter - (lambda (a b) - (< (string-to-number (aref (cadr a) 0)) - (string-to-number (aref (cadr b) 0))))) - (format-generator - (lambda (format) - (let ((field (car format)) - (width (cdr format))) - (cl-case field - (page `("Pg." 3 ,page-sorter :read-only t :right-alight t)) - (t (list - (capitalize (symbol-name field)) - width t :read-only t))))))) + (lambda (a b) + (< (string-to-number (aref (cadr a) 0)) + (string-to-number (aref (cadr b) 0))))) + (format-generator + (lambda (format) + (let ((field (car format)) + (width (cdr format))) + (cl-case field + (page `("Pg." 3 ,page-sorter :read-only t :right-alight t)) + (t (list + (capitalize (symbol-name field)) + width t :read-only t))))))) (setq tabulated-list-entries 'pdf-annot-list-entries tabulated-list-format (vconcat - (mapcar - format-generator - pdf-annot-list-format)) - tabulated-list-padding 2)) + (mapcar + format-generator + pdf-annot-list-format)) + tabulated-list-padding 2)) (set-keymap-parent pdf-annot-list-mode-map tablist-mode-map) (use-local-map pdf-annot-list-mode-map) (when (assq 'type pdf-annot-list-format) (setq tablist-current-filter - `(not (== "Type" "link")))) + `(not (== "Type" "link")))) (tabulated-list-init-header)) (defun pdf-annot-list-annotations () |
