Skip to content

Commit 1a93610

Browse files
committed
add autoloads
1 parent 14b5fa2 commit 1a93610

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

hog.el

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ NAME is the function name
9393
DOCSTRING will be the DOCSTRING of the generated function
9494
9595
BODY is the body of the command that should be executed"
96+
`(autoload (quote ,name) "hog" ,docstring t)
9697
`(defun ,name (project)
9798
,docstring
9899
(interactive (list (completing-read "Project: " (hog--get-projects) nil t)))
@@ -104,6 +105,7 @@ BODY is the body of the command that should be executed"
104105
"Macro to create a Hog interactive command.
105106
NAME is the function name, COMMAND is the command that should be
106107
executed, and DOCSTRING will be passed into the generated function."
108+
`(autoload (quote ,name) "hog" ,docstring t)
107109
`(defun ,name (project)
108110
,docstring
109111
(interactive (list (completing-read "Project: "
@@ -422,6 +424,7 @@ The resulting list is of the form:
422424
(concat (hog--project-root) filename)
423425
(buffer-substring-no-properties (line-beginning-position) (line-end-position))))))
424426

427+
;;;###autoload
425428
(defun hog-init-project ()
426429
"Init a Hog project in the current directory."
427430
(interactive)
@@ -439,6 +442,7 @@ The resulting list is of the form:
439442

440443
;; FIXME: does not work with file names with spaces
441444
;; spaces should be escaped
445+
;;;###autoload
442446
(defun hog-follow-link-at-point ()
443447
"Follow the Hog source file at point."
444448
(interactive)
@@ -452,6 +456,7 @@ The resulting list is of the form:
452456
(find-file (file-name-directory
453457
(car (file-expand-wildcards file-with-path)))))))
454458

459+
;;;###autoload
455460
(defun hog-expand-glob-at-point ()
456461
"Unglob a globbed entry in a source file.
457462
When pointed at a globbed (wildcard) in a source file, this
@@ -511,6 +516,7 @@ in that path"
511516
;; docstring
512517
"Major mode for Hog src files")
513518

519+
;;;###autoload
514520
(defun hog-clean-vivado-xci ()
515521
"Clean the output products of Vivado XCI Files."
516522
(interactive)
@@ -654,22 +660,27 @@ template at a specific PATH."
654660
;; replace trailing tabs and insert the template
655661
(insert (replace-regexp-in-string "[[:blank:]]*$" "" template-text)))))
656662

663+
;;;###autoload
657664
(defun hog-insert-vhdl-template ()
658665
"Insert a vivado vhdl template."
659666
(interactive (hog--insert-template 'vhdl)))
660667

668+
;;;###autoload
661669
(defun hog-insert-verilog-template ()
662670
"Insert a vivado verilog template."
663671
(interactive (hog--insert-template 'verilog)))
664672

673+
;;;###autoload
665674
(defun hog-insert-xdc-template ()
666675
"Insert a vivado XDC template."
667676
(interactive (hog--insert-template 'xdc)))
668677

678+
;;;###autoload
669679
(defun hog-insert-systemverilog-template ()
670680
"Insert a vivado systemverilog template."
671681
(interactive (hog--insert-template 'systemverilog)))
672682

683+
;;;###autoload
673684
(defun hog-check-src-file ()
674685
"Check a Hog source file for broken links."
675686
(let ((errors 0))

0 commit comments

Comments
 (0)