Skip to content

Commit 819c667

Browse files
committed
quoting functions with #'; whitespace
1 parent a788e76 commit 819c667

File tree

3 files changed

+47
-47
lines changed

3 files changed

+47
-47
lines changed

elot-defs.org

+24-24
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ tangling to OMN.
180180
(delete-file local-file)))) ;; Clean up temp file after conversion
181181

182182
(defun elot-download-ontology (url dest-file)
183-
"Download an ontology from URL with content negotiation and save it to DEST-FILE.
184-
Requests the ontology in the best available format: Turtle, RDF/XML, N3, JSON-LD,
185-
OWL Functional Syntax, or Manchester Syntax."
183+
"Download an ontology from URL with content negotiation, save it to DEST-FILE.
184+
Requests the ontology in the best available format: Turtle, RDF/XML, N3,
185+
JSON-LD, OWL Functional Syntax, or Manchester Syntax."
186186
(let ((url-request-extra-headers
187187
'(("Accept" . "text/turtle, application/rdf+xml, text/n3, application/ld+json, text/owl-functional, text/owl-manchester; q=0.9"))))
188188
(url-copy-file url dest-file t)))
@@ -309,20 +309,20 @@ the ID string.
309309
The function is used to check whether the list contains ELT."
310310
(org-element-map x elt #'identity))
311311
(defun elot-org-elt-item-tag-str (x)
312-
"For an item X in an org-element-map, return the item tag."
312+
"For an item X in an `org-element-map', return the item tag."
313313
(if (org-element-property :tag x)
314314
(substring-no-properties (org-element-interpret-data (org-element-property :tag x)))))
315315
(defun elot-org-elt-item-pars-str (x)
316-
"For an item X in an org-element-map, return the paragraphs as one string."
316+
"For an item X in an `org-element-map', return the paragraphs as one string."
317317
(replace-regexp-in-string "\\([^
318318
]\\)\n[ \t]*" "\\1 "
319-
(string-trim (apply 'concat
319+
(string-trim (apply #'concat
320320
(org-element-map x '(paragraph plain-list)
321321
(lambda (y) (substring-no-properties
322322
(org-element-interpret-data y)))
323323
nil nil 'plain-list)))))
324324
(defun elot-org-elt-item-str (x)
325-
"For X in an org-element-map, return pair of strings (tag, paragraph content)."
325+
"For X in an `org-element-map', return pair of strings (tag, paragraph content)."
326326
(list (elot-org-elt-item-tag-str x) (elot-org-elt-item-pars-str x)))
327327
(defun elot-org-descriptions-in-section-helper ()
328328
"Return all description list items as pairs in a list.
@@ -1053,8 +1053,8 @@ To get the ttl block to process correctly, for rdfpuml use.
10531053
(always params) ;; ignore argument
10541054
body))
10551055

1056-
(unless (fboundp 'org-babel-execute:ttl)
1057-
(defalias 'org-babel-execute:ttl 'elot-org-babel-execute-passthrough))
1056+
(unless (fboundp #'org-babel-execute:ttl)
1057+
(defalias #'org-babel-execute:ttl #'elot-org-babel-execute-passthrough))
10581058
#+end_src
10591059

10601060
*** Execute rdfpuml on Turtle content
@@ -1077,7 +1077,7 @@ rdfpuml, and returns the filename of the resulting PlantUML file.
10771077
(input-ttl-file (org-babel-temp-file "rdfpuml-" ".ttl"))
10781078
(output-puml-file (concat (file-name-sans-extension input-ttl-file) ".puml")))
10791079
(with-temp-file input-ttl-file
1080-
(insert (mapconcat 'identity
1080+
(insert (mapconcat #'identity
10811081
(list prefixes ttl config options-str) "\n")))
10821082
;; apparently prefixes.ttl is needed to reside in current dir, will overwrite
10831083
(if prefixes (with-temp-file "prefixes.ttl"
@@ -1118,17 +1118,17 @@ placed in the default ELOT directory, and the filename returned.
11181118
Insert a document header with =<oh=.
11191119
#+name: src-tempo-docheader
11201120
#+begin_src emacs-lisp :results none
1121-
(tempo-define-template "elot-doc-header"
1122-
'("# -*- eval: (load-library \"elot-defaults\") -*-" > n
1123-
"#+title: " (p "Document title: " doctitle) > n
1124-
"#+subtitle: An OWL ontology" > n
1125-
"#+author: " (p "Author name: " authname) > n
1126-
"#+date: WIP (version of " (format-time-string "%Y-%m-%d %H:%M") ")" > n
1127-
"#+call: theme-readtheorg()" n n
1128-
(progn (load-library "elot-defaults") (message "Loaded ELOT") ""))
1129-
"<odh"
1130-
"ELOT document header"
1131-
'org-tempo-tags)
1121+
(tempo-define-template "elot-doc-header"
1122+
'("# -*- eval: (load-library \"elot-defaults\") -*-" > n
1123+
"#+title: " (p "Document title: " doctitle) > n
1124+
"#+subtitle: An OWL ontology" > n
1125+
"#+author: " (p "Author name: " authname) > n
1126+
"#+date: WIP (version of " (format-time-string "%Y-%m-%d %H:%M") ")" > n
1127+
"#+call: theme-readtheorg()" n n
1128+
(progn (load-library "elot-defaults") (message "Loaded ELOT") ""))
1129+
"<odh"
1130+
"ELOT document header"
1131+
'org-tempo-tags)
11321132
#+end_src
11331133
**** ELOT ontology skeleton
11341134
Insert a skeleton with =<ods=.
@@ -1596,11 +1596,11 @@ metrics.
15961596
;;
15971597
(modify-syntax-entry ?\: "w")
15981598
(modify-syntax-entry ?\_ "w")
1599-
(add-hook 'org-babel-post-tangle-hook 'elot-tangled-omn-to-ttl
1599+
(add-hook 'org-babel-post-tangle-hook #'elot-tangled-omn-to-ttl
16001600
'local) ;; make it a local hook only
1601-
(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images 'local)
1601+
(add-hook 'org-babel-after-execute-hook #'org-redisplay-inline-images 'local)
16021602
(declare-function elot-update-link-abbrev "elot.el")
1603-
(add-hook 'after-save-hook 'elot-update-link-abbrev)
1603+
(add-hook 'after-save-hook #'elot-update-link-abbrev)
16041604
;; the label display functions are in a separate file
16051605
(require 'elot-label-display)
16061606
(declare-function elot-label-display-setup "elot-label-display.el")

elot-package/elot-defaults.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@
9898
;;
9999
(modify-syntax-entry ?\: "w")
100100
(modify-syntax-entry ?\_ "w")
101-
(add-hook 'org-babel-post-tangle-hook 'elot-tangled-omn-to-ttl
101+
(add-hook 'org-babel-post-tangle-hook #'elot-tangled-omn-to-ttl
102102
'local) ;; make it a local hook only
103-
(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images 'local)
103+
(add-hook 'org-babel-after-execute-hook #'org-redisplay-inline-images 'local)
104104
(declare-function elot-update-link-abbrev "elot.el")
105-
(add-hook 'after-save-hook 'elot-update-link-abbrev)
105+
(add-hook 'after-save-hook #'elot-update-link-abbrev)
106106
;; the label display functions are in a separate file
107107
(require 'elot-label-display)
108108
(declare-function elot-label-display-setup "elot-label-display.el")

elot-package/elot.el

+20-20
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ file, with `.org' as the extension."
161161
(delete-file local-file)))) ;; Clean up temp file after conversion
162162

163163
(defun elot-download-ontology (url dest-file)
164-
"Download an ontology from URL with content negotiation and save it to DEST-FILE.
165-
Requests the ontology in the best available format: Turtle, RDF/XML, N3, JSON-LD,
166-
OWL Functional Syntax, or Manchester Syntax."
164+
"Download an ontology from URL with content negotiation, save it to DEST-FILE.
165+
Requests the ontology in the best available format: Turtle, RDF/XML, N3,
166+
JSON-LD, OWL Functional Syntax, or Manchester Syntax."
167167
(let ((url-request-extra-headers
168168
'(("Accept" . "text/turtle, application/rdf+xml, text/n3, application/ld+json, text/owl-functional, text/owl-manchester; q=0.9"))))
169169
(url-copy-file url dest-file t)))
@@ -263,20 +263,20 @@ Uses `org-element-map` to collect matching elements.
263263
The function is used to check whether the list contains ELT."
264264
(org-element-map x elt #'identity))
265265
(defun elot-org-elt-item-tag-str (x)
266-
"For an item X in an org-element-map, return the item tag."
266+
"For an item X in an `org-element-map', return the item tag."
267267
(if (org-element-property :tag x)
268268
(substring-no-properties (org-element-interpret-data (org-element-property :tag x)))))
269269
(defun elot-org-elt-item-pars-str (x)
270-
"For an item X in an org-element-map, return the paragraphs as one string."
270+
"For an item X in an `org-element-map', return the paragraphs as one string."
271271
(replace-regexp-in-string "\\([^
272272
]\\)\n[ \t]*" "\\1 "
273-
(string-trim (apply 'concat
273+
(string-trim (apply #'concat
274274
(org-element-map x '(paragraph plain-list)
275275
(lambda (y) (substring-no-properties
276276
(org-element-interpret-data y)))
277277
nil nil 'plain-list)))))
278278
(defun elot-org-elt-item-str (x)
279-
"For X in an org-element-map, return pair of strings (tag, paragraph content)."
279+
"For X in an `org-element-map', return pair of strings (tag, paragraph content)."
280280
(list (elot-org-elt-item-tag-str x) (elot-org-elt-item-pars-str x)))
281281
(defun elot-org-descriptions-in-section-helper ()
282282
"Return all description list items as pairs in a list.
@@ -856,8 +856,8 @@ PARAMS is ignored."
856856
(always params) ;; ignore argument
857857
body))
858858

859-
(unless (fboundp 'org-babel-execute:ttl)
860-
(defalias 'org-babel-execute:ttl 'elot-org-babel-execute-passthrough))
859+
(unless (fboundp #'org-babel-execute:ttl)
860+
(defalias #'org-babel-execute:ttl #'elot-org-babel-execute-passthrough))
861861
;; src-babel-passthrough ends here
862862

863863
;; [[file:../elot-defs.org::src-rdfpuml-execute][src-rdfpuml-execute]]
@@ -876,7 +876,7 @@ EPILOGUE extra PlantUML clauses."
876876
(input-ttl-file (org-babel-temp-file "rdfpuml-" ".ttl"))
877877
(output-puml-file (concat (file-name-sans-extension input-ttl-file) ".puml")))
878878
(with-temp-file input-ttl-file
879-
(insert (mapconcat 'identity
879+
(insert (mapconcat #'identity
880880
(list prefixes ttl config options-str) "\n")))
881881
;; apparently prefixes.ttl is needed to reside in current dir, will overwrite
882882
(if prefixes (with-temp-file "prefixes.ttl"
@@ -911,16 +911,16 @@ Return output file name."
911911

912912
;; [[file:../elot-defs.org::src-tempo-docheader][src-tempo-docheader]]
913913
(tempo-define-template "elot-doc-header"
914-
'("# -*- eval: (load-library \"elot-defaults\") -*-" > n
915-
"#+title: " (p "Document title: " doctitle) > n
916-
"#+subtitle: An OWL ontology" > n
917-
"#+author: " (p "Author name: " authname) > n
918-
"#+date: WIP (version of " (format-time-string "%Y-%m-%d %H:%M") ")" > n
919-
"#+call: theme-readtheorg()" n n
920-
(progn (load-library "elot-defaults") (message "Loaded ELOT") ""))
921-
"<odh"
922-
"ELOT document header"
923-
'org-tempo-tags)
914+
'("# -*- eval: (load-library \"elot-defaults\") -*-" > n
915+
"#+title: " (p "Document title: " doctitle) > n
916+
"#+subtitle: An OWL ontology" > n
917+
"#+author: " (p "Author name: " authname) > n
918+
"#+date: WIP (version of " (format-time-string "%Y-%m-%d %H:%M") ")" > n
919+
"#+call: theme-readtheorg()" n n
920+
(progn (load-library "elot-defaults") (message "Loaded ELOT") ""))
921+
"<odh"
922+
"ELOT document header"
923+
'org-tempo-tags)
924924
;; src-tempo-docheader ends here
925925

926926
;; [[file:../elot-defs.org::src-tempo-ontology][src-tempo-ontology]]

0 commit comments

Comments
 (0)