Skip to content

Commit a165795

Browse files
committed
Add autoloads on all interactive commands (#392)
1 parent 7f37ba5 commit a165795

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

haskell-commands.el

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
(require 'haskell-session)
2525
(require 'highlight-uses-mode)
2626

27+
;;;###autoload
2728
(defun haskell-process-restart ()
2829
"Restart the inferior Haskell process."
2930
(interactive)
@@ -157,12 +158,14 @@ If I break, you can:
157158
(error "No Haskell session/process associated with this
158159
buffer. Maybe run M-x haskell-session-change?")))
159160

161+
;;;###autoload
160162
(defun haskell-process-clear ()
161163
"Clear the current process."
162164
(interactive)
163165
(haskell-process-reset (haskell-commands-process))
164166
(haskell-process-set (haskell-commands-process) 'command-queue nil))
165167

168+
;;;###autoload
166169
(defun haskell-process-interrupt ()
167170
"Interrupt the process (SIGINT)."
168171
(interactive)
@@ -175,6 +178,7 @@ If I break, you can:
175178
(haskell-process-queue-without-filters process ":reload")
176179
(haskell-process-queue-without-filters process ":set -fobject-code"))
177180

181+
;;;###autoload
178182
(defun haskell-process-touch-buffer (process buffer)
179183
"Updates mtime on the file for BUFFER by queing a touch on
180184
PROCESS."
@@ -253,6 +257,7 @@ from `module-buffer'."
253257
(car state)
254258
(format ":m + %s" (mapconcat 'identity (cdr state) " "))))))))
255259

260+
;;;###autoload
256261
(defun haskell-describe (ident)
257262
"Describe the given identifier."
258263
(interactive (list (read-from-minibuffer "Describe identifier: "
@@ -289,6 +294,7 @@ from `module-buffer'."
289294
do (insert "\n\n"))
290295
(insert "No results for " ident)))))))
291296

297+
;;;###autoload
292298
(defun haskell-rgrep (&optional prompt)
293299
"Grep the effective project for the symbol at point. Very
294300
useful for codebase navigation. Prompts for an arbitrary regexp
@@ -445,6 +451,7 @@ Returns:
445451
(list 'module
446452
(match-string 1 defined))))))))))))))
447453

454+
;;;###autoload
448455
(defun haskell-mode-jump-to-def (ident)
449456
"Jump to definition of identifier at point."
450457
(interactive (list (haskell-ident-at-point)))
@@ -529,6 +536,7 @@ command from GHCi."
529536
(buffer-substring-no-properties (car pos)
530537
(cdr pos))))))))))
531538

539+
;;;###autoload
532540
(defun haskell-process-cd (&optional not-interactive)
533541
"Change directory."
534542
(interactive)
@@ -574,6 +582,7 @@ command from GHCi."
574582
(format "Changed directory: %s"
575583
(cl-caddr state)))))))
576584

585+
;;;###autoload
577586
(defun haskell-process-cabal-macros ()
578587
"Send the cabal macros string."
579588
(interactive)
@@ -616,6 +625,7 @@ command from GHCi."
616625
(string-match "^<interactive>" response))
617626
(haskell-mode-message-line response)))))))
618627

628+
;;;###autoload
619629
(defun haskell-mode-show-type-at (&optional insert-value)
620630
"Show the type of the thing at point."
621631
(interactive "P")
@@ -642,6 +652,7 @@ command from GHCi."
642652
(insert (haskell-fontify-as-mode ty 'haskell-mode)))))))
643653
(message "%s" (haskell-fontify-as-mode ty 'haskell-mode)))))
644654

655+
;;;###autoload
645656
(defun haskell-process-generate-tags (&optional and-then-find-this-tag)
646657
"Regenerate the TAGS table."
647658
(interactive)
@@ -686,6 +697,7 @@ to be loaded by ghci."
686697
(haskell-interactive-process)
687698
(format ":set -i%s" ghci-gen-dir)))))
688699

700+
;;;###autoload
689701
(defun haskell-process-unignore ()
690702
"Unignore any files that were specified as being ignored by the
691703
inferior GHCi process."
@@ -711,6 +723,7 @@ to be loaded by ghci."
711723
(y-or-n-p "Restart GHCi process now? "))
712724
(haskell-process-restart)))))
713725

726+
;;;###autoload
714727
(defun haskell-session-change-target (target)
715728
"Set the build target for cabal repl"
716729
(interactive "sNew build target:")
@@ -722,6 +735,7 @@ to be loaded by ghci."
722735
(y-or-n-p "Target changed, restart haskell process?"))
723736
(haskell-process-start session)))))
724737

738+
;;;###autoload
725739
(defun haskell-mode-stylish-buffer ()
726740
"Apply stylish-haskell to the current buffer."
727741
(interactive)
@@ -777,6 +791,7 @@ remains unchanged."
777791
(delete-file tmp-file)
778792
(delete-file err-file)))
779793

794+
;;;###autoload
780795
(defun haskell-mode-find-uses ()
781796
"Find uses of the identifier at point, highlight them all."
782797
(interactive)

haskell-load.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ actual Emacs buffer of the module being loaded."
344344
(when echo
345345
(haskell-interactive-mode-echo session msg))))
346346

347+
;;;###autoload
347348
(defun haskell-process-reload-devel-main ()
348349
"Reload the module `DevelMain' and then run
349350
`DevelMain.update'. This is for doing live update of the code of

0 commit comments

Comments
 (0)