From a221b4a5423de77d167235747dfcf7f0b06dd4c3 Mon Sep 17 00:00:00 2001 From: William Kunkel Date: Sun, 2 Aug 2015 20:54:12 -0400 Subject: [PATCH 1/3] Add ;;;###autoload to each defcustom --- ghc-core.el | 2 ++ haskell-align-imports.el | 1 + haskell-bot.el | 2 ++ haskell-cabal.el | 1 + haskell-checkers.el | 6 ++++++ haskell-compile.el | 4 ++++ haskell-complete-module.el | 2 ++ haskell-customize.el | 41 ++++++++++++++++++++++++++++++++++++++ haskell-decl-scan.el | 2 ++ haskell-doc.el | 7 +++++++ haskell-font-lock.el | 2 ++ haskell-indent.el | 8 +++++++- haskell-indentation.el | 10 +++++++++- haskell-menu.el | 1 + haskell-mode.el | 10 +++++++++- inf-haskell.el | 9 ++++++++- w3m-haddock.el | 1 + 17 files changed, 105 insertions(+), 4 deletions(-) diff --git a/ghc-core.el b/ghc-core.el index ffe4d900f..1d0e97c44 100644 --- a/ghc-core.el +++ b/ghc-core.el @@ -38,12 +38,14 @@ :group 'haskell :prefix "ghc-core-") +;;;###autoload (defcustom ghc-core-program "ghc" "Name of the GHC executable (excluding any arguments)." :type 'string :group 'ghc-core) +;;;###autoload (defcustom ghc-core-program-args '("-O2") "Additional options to be passed to GHC when generating core output. diff --git a/haskell-align-imports.el b/haskell-align-imports.el index 2fbf51565..5ee9eb708 100644 --- a/haskell-align-imports.el +++ b/haskell-align-imports.el @@ -108,6 +108,7 @@ "\\( -- .*\\)?[ ]*$") "Regex used for matching components of an import.") +;;;###autoload (defcustom haskell-align-imports-pad-after-name nil "Pad layout after the module name also." diff --git a/haskell-bot.el b/haskell-bot.el index 47857faab..b0c1ea10c 100644 --- a/haskell-bot.el +++ b/haskell-bot.el @@ -90,11 +90,13 @@ (defvar haskell-bot-process-buffer nil "*Buffer used for communication with Bot subprocess for current buffer.") +;;;###autoload (defcustom haskell-bot-program-name "lambdabot" "*The name of the Bot interpreter program." :type 'string :group 'haskell-bot) +;;;###autoload (defcustom haskell-bot-program-args nil "*A list of string args to pass when starting the Bot interpreter." :type '(repeat string) diff --git a/haskell-cabal.el b/haskell-cabal.el index 64ca13961..6f7e40a51 100644 --- a/haskell-cabal.el +++ b/haskell-cabal.el @@ -307,6 +307,7 @@ OTHER-WINDOW use `find-file-other-window'." :group 'haskell ) +;;;###autoload (defcustom haskell-cabal-list-comma-position 'before "Where to put the comma in lists" diff --git a/haskell-checkers.el b/haskell-checkers.el index dfc7bb800..37cc1d117 100644 --- a/haskell-checkers.el +++ b/haskell-checkers.el @@ -37,31 +37,37 @@ :type 'string :group 'haskell-checkers) +;;;###autoload (defcustom haskell-scan-command "scan" "The default scan command for \\[haskell-scan]." :type 'string :group 'haskell-checkers) +;;;###autoload (defcustom haskell-scan-options "" "The default options for \\[haskell-scan]." :type 'string :group 'haskell-checkers) +;;;###autoload (defcustom haskell-lint-options "" "The default options for \\[hlint]." :type 'string :group 'haskell-checkers) +;;;###autoload (defcustom haskell-checkers-save-files t "Save modified files when run checker or not (ask user)" :type 'boolean :group 'haskell-checkers) +;;;###autoload (defcustom haskell-checkers-replace-with-suggestions nil "Replace user's code with suggested replacements (hlint only)" :type 'boolean :group 'haskell-checkers) +;;;###autoload (defcustom haskell-checkers-replace-without-ask nil "Replace user's code with suggested replacements automatically (hlint only)" :type 'boolean diff --git a/haskell-compile.el b/haskell-compile.el index 73181acca..cdc630800 100644 --- a/haskell-compile.el +++ b/haskell-compile.el @@ -34,6 +34,7 @@ :link '(custom-manual "(haskell-mode)compilation") :group 'haskell) +;;;###autoload (defcustom haskell-compile-cabal-build-command "cd %s && cabal build --ghc-option=-ferror-spans" "Default build command to use for `haskell-cabal-build' when a cabal file is detected. @@ -41,6 +42,7 @@ The `%s' placeholder is replaced by the cabal package top folder." :group 'haskell-compile :type 'string) +;;;###autoload (defcustom haskell-compile-cabal-build-alt-command "cd %s && cabal clean -s && cabal build --ghc-option=-ferror-spans" "Alternative build command to use when `haskell-cabal-build' is called with a negative prefix argument. @@ -48,6 +50,7 @@ The `%s' placeholder is replaced by the cabal package top folder." :group 'haskell-compile :type 'string) +;;;###autoload (defcustom haskell-compile-command "ghc -Wall -ferror-spans -fforce-recomp -c %s" "Default build command to use for `haskell-cabal-build' when no cabal file is detected. @@ -55,6 +58,7 @@ The `%s' placeholder is replaced by the current buffer's filename." :group 'haskell-compile :type 'string) +;;;###autoload (defcustom haskell-compile-ghc-filter-linker-messages t "Filter out unremarkable \"Loading package...\" linker messages during compilation." diff --git a/haskell-complete-module.el b/haskell-complete-module.el index ff157a7cf..5b33579be 100644 --- a/haskell-complete-module.el +++ b/haskell-complete-module.el @@ -19,12 +19,14 @@ (require 'cl-lib) +;;;###autoload (defcustom haskell-complete-module-preferred '() "Override ordering of module results by specifying preferred modules." :group 'haskell :type '(repeat string)) +;;;###autoload (defcustom haskell-complete-module-max-display 10 "Maximum items to display in minibuffer." diff --git a/haskell-customize.el b/haskell-customize.el index e6ac83ebd..79f8c1c1c 100644 --- a/haskell-customize.el +++ b/haskell-customize.el @@ -22,6 +22,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Customization variables +;;;###autoload (defcustom haskell-process-load-or-reload-prompt nil "Nil means there will be no prompts on starting REPL. Defaults will be accepted." :type 'boolean @@ -37,6 +38,7 @@ "Package base directory of installed `haskell-mode'. Used for locating additional package data files.") +;;;###autoload (defcustom haskell-completing-read-function 'ido-completing-read "Default function to use for completion." :group 'haskell @@ -46,12 +48,14 @@ Used for locating additional package data files.") (function-item :tag "completing-read" :value completing-read) (function :tag "Custom function"))) +;;;###autoload (defcustom haskell-process-type 'auto "The inferior Haskell process type to use." :type '(choice (const auto) (const ghci) (const cabal-repl) (const stack-ghci)) :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-wrapper-function #'identity "Wrap or transform haskell process commands using this function. @@ -72,6 +76,7 @@ a per-project basis." (function-item :tag "None" :value identity) (function :tag "Custom function"))) +;;;###autoload (defcustom haskell-ask-also-kill-buffers t "Ask whether to kill all associated buffers when a session @@ -82,6 +87,7 @@ a per-project basis." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Configuration +;;;###autoload (defcustom haskell-doc-prettify-types t "Replace some parts of types with Unicode characters like \"∷\" when showing type information about symbols." @@ -97,30 +103,35 @@ when showing type information about symbols." :link '(custom-manual "(haskell-mode)haskell-interactive-mode") :group 'haskell) +;;;###autoload (defcustom haskell-process-path-ghci "ghci" "The path for starting ghci." :group 'haskell-interactive :type '(choice string (repeat string))) +;;;###autoload (defcustom haskell-process-path-cabal "cabal" "Path to the `cabal' executable." :group 'haskell-interactive :type '(choice string (repeat string))) +;;;###autoload (defcustom haskell-process-path-stack "stack" "The path for starting stack." :group 'haskell-interactive :type '(choice string (repeat string))) +;;;###autoload (defcustom haskell-process-args-ghci '("-ferror-spans") "Any arguments for starting ghci." :group 'haskell-interactive :type '(repeat (string :tag "Argument"))) +;;;###autoload (defcustom haskell-process-args-cabal-repl '("--ghc-option=-ferror-spans") "Additional arguments for `cabal repl' invocation. @@ -133,12 +144,14 @@ pass additional flags to `ghc'." :group 'haskell-interactive :type '(repeat (string :tag "Argument"))) +;;;###autoload (defcustom haskell-process-args-stack-ghci '("--ghc-options=-ferror-spans") "Additional arguments for `stack ghci' invocation." :group 'haskell-interactive :type '(repeat (string :tag "Argument"))) +;;;###autoload (defcustom haskell-process-do-cabal-format-string ":!cd %s && %s" "The way to run cabal comands. It takes two arguments -- the directory and the command. @@ -146,54 +159,63 @@ See `haskell-process-do-cabal' for more details." :group 'haskell-interactive :type 'string) +;;;###autoload (defcustom haskell-process-log nil "Enable debug logging to \"*haskell-process-log*\" buffer." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-show-debug-tips t "Show debugging tips when starting the process." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-notify-p nil "Notify using notifications.el (if loaded)?" :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-no-warn-orphans t "Suggest adding -fno-warn-orphans pragma to file when getting orphan warnings." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-hoogle-imports nil "Suggest to add import statements using Hoogle as a backend." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-hayoo-imports nil "Suggest to add import statements using Hayoo as a backend." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-hayoo-query-url "http://hayoo.fh-wedel.de/json/?query=%s" "Query url for json hayoo results." :type 'string :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-haskell-docs-imports nil "Suggest to add import statements using haskell-docs as a backend." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-add-package t "Suggest to add packages to your .cabal file when Cabal says it @@ -201,24 +223,28 @@ is a member of the hidden package, blah blah." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-language-pragmas t "Suggest adding LANGUAGE pragmas recommended by GHC." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-remove-import-lines nil "Suggest removing import lines as warned by GHC." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-overloaded-strings t "Suggest adding OverloadedStrings pragma to file when getting type mismatches with [Char]." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-check-cabal-config-on-load t "Check changes cabal config on loading Haskell files and @@ -226,6 +252,7 @@ restart the GHCi process if changed.." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-prompt-restart-on-cabal-change t "Ask whether to restart the GHCi process when the Cabal file @@ -233,12 +260,14 @@ has changed?" :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-auto-import-loaded-modules nil "Auto import the modules reported by GHC to have been loaded?" :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-reload-with-fbytecode nil "When using -fobject-code, auto reload with -fbyte-code (and @@ -247,6 +276,7 @@ imports become available?" :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-use-presentation-mode nil "Use presentation mode to show things like type info instead of @@ -254,30 +284,35 @@ imports become available?" :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-process-suggest-restart t "Suggest restarting the process when it has died" :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-interactive-mode-scroll-to-bottom nil "Scroll to bottom in the REPL always." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-interactive-popup-errors t "Popup errors in a separate buffer." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-interactive-mode-collapse nil "Collapse printed results." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-interactive-types-for-show-ambiguous t "Show types when there's no Show instance or there's an @@ -288,24 +323,28 @@ ambiguous class constraint." (defvar haskell-interactive-prompt "λ> " "The prompt to use.") +;;;###autoload (defcustom haskell-interactive-mode-eval-mode nil "Use the given mode's font-locking to render some text." :type '(choice function (const :tag "None" nil)) :group 'haskell-interactive) +;;;###autoload (defcustom haskell-interactive-mode-hide-multi-line-errors nil "Hide collapsible multi-line compile messages by default." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-interactive-mode-delete-superseded-errors t "Whether to delete compile messages superseded by recompile/reloads." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-interactive-mode-include-file-name t "Include the file name of the module being compiled when @@ -313,6 +352,7 @@ printing compilation messages." :type 'boolean :group 'haskell-interactive) +;;;###autoload (defcustom haskell-import-mapping '() "Support a mapping from module to import lines. @@ -333,6 +373,7 @@ when Data.Map is the candidate. (string :tag "Import lines"))) :group 'haskell-interactive) +;;;###autoload (defcustom haskell-language-extensions '() "Language extensions in use. Should be in format: -XFoo, diff --git a/haskell-decl-scan.el b/haskell-decl-scan.el index 5429812cd..14b8d0987 100644 --- a/haskell-decl-scan.el +++ b/haskell-decl-scan.el @@ -111,11 +111,13 @@ :group 'haskell :prefix "haskell-decl-scan-") +;;;###autoload (defcustom haskell-decl-scan-bindings-as-variables nil "Whether to put top-level value bindings into a \"Variables\" category." :group 'haskell-decl-scan :type 'boolean) +;;;###autoload (defcustom haskell-decl-scan-add-to-menubar t "Whether to add a \"Declarations\" menu entry to menu bar." :group 'haskell-decl-scan diff --git a/haskell-doc.el b/haskell-doc.el index 4e0942e55..1c08024de 100644 --- a/haskell-doc.el +++ b/haskell-doc.el @@ -354,6 +354,7 @@ The function `haskell-doc-make-global-fct-index' rebuilds this variables This variable is buffer-local.") (make-variable-buffer-local 'haskell-doc-index) +;;;###autoload (defcustom haskell-doc-show-global-types nil "If non-nil, search for the types of global functions by loading the files. This variable is buffer-local." @@ -361,6 +362,7 @@ This variable is buffer-local." :type 'boolean) (make-variable-buffer-local 'haskell-doc-show-global-types) +;;;###autoload (defcustom haskell-doc-show-reserved t "If non-nil, show a documentation string for reserved ids. This variable is buffer-local." @@ -368,6 +370,7 @@ This variable is buffer-local." :type 'boolean) (make-variable-buffer-local 'haskell-doc-show-reserved) +;;;###autoload (defcustom haskell-doc-show-prelude t "If non-nil, show a documentation string for prelude functions. This variable is buffer-local." @@ -375,6 +378,7 @@ This variable is buffer-local." :type 'boolean) (make-variable-buffer-local 'haskell-doc-show-prelude) +;;;###autoload (defcustom haskell-doc-show-strategy t "If non-nil, show a documentation string for strategies. This variable is buffer-local." @@ -382,6 +386,7 @@ This variable is buffer-local." :type 'boolean) (make-variable-buffer-local 'haskell-doc-show-strategy) +;;;###autoload (defcustom haskell-doc-show-user-defined t "If non-nil, show a documentation string for user defined ids. This variable is buffer-local." @@ -389,11 +394,13 @@ This variable is buffer-local." :type 'boolean) (make-variable-buffer-local 'haskell-doc-show-user-defined) +;;;###autoload (defcustom haskell-doc-chop-off-context t "If non-nil eliminate the context part in a Haskell type." :group 'haskell-doc :type 'boolean) +;;;###autoload (defcustom haskell-doc-chop-off-fctname nil "If non-nil omit the function name and show only the type." :group 'haskell-doc diff --git a/haskell-font-lock.el b/haskell-font-lock.el index 6990933ed..4692ceaa2 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -30,6 +30,7 @@ (require 'haskell-mode) (require 'font-lock) +;;;###autoload (defcustom haskell-font-lock-symbols nil "Display \\ and -> and such using symbols in fonts. @@ -38,6 +39,7 @@ alignment and can thus lead to nasty surprises w.r.t layout." :group 'haskell :type 'boolean) +;;;###autoload (defcustom haskell-font-lock-symbols-alist '(("\\" . "λ") ("not" . "¬") diff --git a/haskell-indent.el b/haskell-indent.el index 409079b54..6cdcf0e1a 100644 --- a/haskell-indent.el +++ b/haskell-indent.el @@ -98,18 +98,21 @@ :link '(custom-manual "(haskell-mode)Indentation") :prefix "haskell-indent-") +;;;###autoload (defcustom haskell-indent-offset 4 "Indentation of Haskell statements with respect to containing block." :type 'integer :safe #'natnump :group 'haskell-indent) +;;;###autoload (defcustom haskell-indent-literate-Bird-default-offset 1 "Default number of blanks after > in a Bird style literate script." :type 'integer :safe #'natnump :group 'haskell-indent) +;;;###autoload (defcustom haskell-indent-rhs-align-column 0 "Column on which to align right-hand sides (use 0 for ad-hoc alignment)." :type 'integer @@ -322,7 +325,7 @@ It deals with both Bird style and non Bird-style scripts." (insert "\\begin{code}\n"))))) ;;; Start of indentation code - +;;;###autoload (defcustom haskell-indent-look-past-empty-line t "If nil, indentation engine will not look past an empty line for layout points." :group 'haskell-indent @@ -1018,6 +1021,7 @@ OPEN is the start position of the comment in which point is." (haskell-indent-point-to-col (match-end 0))) (haskell-indent-point-to-col (point)))))))))) +;;;###autoload (defcustom haskell-indent-thenelse 0 "If non-nil, \"then\" and \"else\" are indented. This is necessary in the \"do\" layout under Haskell-98. @@ -1049,6 +1053,7 @@ See http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse" (list (list (+ (if (memq (char-after) '(?t ?e)) haskell-indent-thenelse 0) (haskell-indent-point-to-col open)))))) +;;;###autoload (defcustom haskell-indent-after-keywords '(("where" 2 0) ("of" 2) @@ -1097,6 +1102,7 @@ is at the end of an otherwise-non-empty line." (or (assoc id haskell-indent-after-keywords) (car (member id haskell-indent-after-keywords))))) +;;;###autoload (defcustom haskell-indent-dont-hang '("(") "Lexemes that should never be considered as hanging." :group 'haskell-indent diff --git a/haskell-indentation.el b/haskell-indentation.el index ef4b6993c..05a38adce 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -49,6 +49,7 @@ :group 'haskell :prefix "haskell-indentation-") +;;;###autoload (defcustom haskell-indentation-show-indentations nil "If t the current line's indentation points will be showed as underscore overlays in new haskell-mode buffers. Use @@ -58,6 +59,7 @@ behavior for already existing buffers." :type 'boolean :group 'haskell-indentation) +;;;###autoload (defcustom haskell-indentation-show-indentations-after-eol nil "If t, try to show indentation points after the end of line. This requires strange overlay hacks and can collide with other @@ -75,37 +77,43 @@ modes (e.g. fill-column-indicator)." "Face used for indentations overlay after EOL if hl-line mode is enabled." :group 'haskell-indentation) - +;;;###autoload (defcustom haskell-indentation-indent-leftmost t "Indent to the left margin after certain keywords (for example after let .. in, case .. of). If set to t it will only indent to the left. If nil only relative to the containing expression. If set to the keyword 'both then both positions are allowed." :type 'symbol :group 'haskell-indentation) +;;;###autoload (defcustom haskell-indentation-layout-offset 2 "Extra indentation to add before expressions in a haskell layout list." :type 'integer :group 'haskell-indentation) +;;;###autoload (defcustom haskell-indentation-starter-offset 2 "Extra indentation after an opening keyword (e.g. let)." :type 'integer :group 'haskell-indentation) +;;;###autoload (defcustom haskell-indentation-left-offset 2 "Extra indentation after an indentation to the left (e.g. after do)." :type 'integer :group 'haskell-indentation) +;;;###autoload (defcustom haskell-indentation-ifte-offset 2 "Extra indentation after the keywords `if' `then' or `else'." :type 'integer :group 'haskell-indentation) +;;;###autoload (defcustom haskell-indentation-where-pre-offset 2 "Extra indentation before the keyword `where'." :type 'integer :group 'haskell-indentation) +;;;###autoload (defcustom haskell-indentation-where-post-offset 2 "Extra indentation after the keyword `where'." :type 'integer diff --git a/haskell-menu.el b/haskell-menu.el index c7a3530b2..b4a855b0d 100644 --- a/haskell-menu.el +++ b/haskell-menu.el @@ -33,6 +33,7 @@ (require 'haskell-process) (require 'haskell-interactive-mode) +;;;###autoload (defcustom haskell-menu-buffer-name "*haskell-menu*" "The name of the Haskell session menu buffer" :group 'haskell-interactive diff --git a/haskell-mode.el b/haskell-mode.el index b9a5e0892..d10adf59e 100644 --- a/haskell-mode.el +++ b/haskell-mode.el @@ -182,6 +182,7 @@ of `haskell-literate-default' is used.") (make-variable-buffer-local 'haskell-literate) (put 'haskell-literate 'safe-local-variable 'symbolp) ;; Default literate style for ambiguous literate buffers. +;;;###autoload (defcustom haskell-literate-default 'bird "Default value for `haskell-literate'. Used if the style of a literate buffer is ambiguous. This variable should @@ -558,7 +559,7 @@ May return a qualified name." (delete-indentation arg))) ;; Various mode variables. - +;;;###autoload (defcustom haskell-mode-contextual-import-completion t "Enable import completion on haskell-mode-contextual-space." @@ -807,6 +808,7 @@ Note that negative arguments do not work so well." ;;;###autoload (add-to-list 'completion-ignored-extensions ".hi") +;;;###autoload (defcustom haskell-hoogle-command (if (executable-find "hoogle") "hoogle") "Name of the command to use to query Hoogle. @@ -815,6 +817,7 @@ If nil, use the Hoogle web-site." :type '(choice (const :tag "Use Web-site" nil) string)) +;;;###autoload (defcustom haskell-hoogle-url "http://haskell.org/hoogle/?q=%s" "Default value for hoogle web site. " @@ -894,6 +897,7 @@ is asked to show extra info for the items matching QUERY.." (hoogle-start-server) (error "hoogle is not installed"))))) +;;;###autoload (defcustom haskell-hayoo-url "http://hayoo.fh-wedel.de/?query=%s" "Default value for hayoo web site. " @@ -917,6 +921,7 @@ is asked to show extra info for the items matching QUERY.." ;;;###autoload (defalias 'hayoo 'haskell-hayoo) +;;;###autoload (defcustom haskell-check-command "hlint" "*Command used to check a Haskell file." :group 'haskell @@ -924,11 +929,13 @@ is asked to show extra info for the items matching QUERY.." (const "ghc -fno-code") (string :tag "Other command"))) +;;;###autoload (defcustom haskell-stylish-on-save nil "Whether to run stylish-haskell on the buffer before saving." :group 'haskell :type 'boolean) +;;;###autoload (defcustom haskell-tags-on-save nil "Generate tags via hasktags after saving." :group 'haskell @@ -937,6 +944,7 @@ is asked to show extra info for the items matching QUERY.." (defvar haskell-saved-check-command nil "Internal use.") +;;;###autoload (defcustom haskell-indent-spaces 2 "Number of spaces to indent inwards." :group 'haskell) diff --git a/inf-haskell.el b/inf-haskell.el index 760a6c148..fa42e8cbf 100644 --- a/inf-haskell.el +++ b/inf-haskell.el @@ -51,6 +51,7 @@ ;; Here I depart from the inferior-haskell- prefix. ;; Not sure if it's a good idea. +;;;###autoload (defcustom haskell-program-name ;; Arbitrarily give preference to hugs over ghci. (or (cond @@ -109,6 +110,7 @@ The command can include arguments." "Regexps for error messages generated by inferior Haskell processes. The format should be the same as for `compilation-error-regexp-alist'.") +;;;###autoload (defcustom inferior-haskell-find-project-root t "If non-nil, try and find the project root directory of this file. This will either look for a Cabal file or a \"module\" statement in the file." @@ -204,6 +206,7 @@ setting up the inferior-haskell buffer." (let ((proc (inferior-haskell-process arg))) (pop-to-buffer (process-buffer proc)))) +;;;###autoload (defcustom inferior-haskell-wait-and-jump nil "If non-nil, wait for file loading to terminate and jump to the error." :type 'boolean @@ -584,6 +587,7 @@ The returned info is cached for reuse by `haskell-doc-mode'." ;; * Support fetching of local Haddock docs pulled directly from source files. ;; * Display docs locally? w3m? +;;;###autoload (defcustom inferior-haskell-use-web-docs 'fallback "Whether to use the online documentation. Possible values: @@ -597,6 +601,7 @@ regardless of existance of local files. Default is `fallback'." (const :tag "As fallback" fallback) (const :tag "Always" always))) +;;;###autoload (defcustom inferior-haskell-web-docs-base "http://haskell.org/ghc/docs/latest/html/libraries/" "The base URL of the online libraries documentation. @@ -605,11 +610,13 @@ is `always' or `fallback'." :group 'inferior-haskell :type 'string) +;;;###autoload (defcustom haskell-package-manager-name "ghc-pkg" "Name of the program to consult regarding package details." :group 'inferior-haskell :type 'string) +;;;###autoload (defcustom haskell-package-conf-file (condition-case nil (with-temp-buffer @@ -679,7 +686,7 @@ Insert the output into the current buffer." (message "Generating module alist... done") module-alist))) - +;;;###autoload (defcustom inferior-haskell-module-alist-file ;; (expand-file-name "~/.inf-haskell-module-alist") (expand-file-name (concat "inf-haskell-module-alist-" diff --git a/w3m-haddock.el b/w3m-haddock.el index 588eca09c..308e87f41 100644 --- a/w3m-haddock.el +++ b/w3m-haddock.el @@ -36,6 +36,7 @@ "Face for quarantines." :group 'shm) +;;;###autoload (defcustom haskell-w3m-haddock-dirs '("~/.cabal/share/doc/") "The path to your cabal documentation dir. It should contain From 25a28aa13248126df50c79b63e11072a5ce4911d Mon Sep 17 00:00:00 2001 From: William Kunkel Date: Sun, 2 Aug 2015 21:01:06 -0400 Subject: [PATCH 2/3] Add ;;;###autoload to each defface --- haskell-debug.el | 6 ++++++ haskell-font-lock.el | 5 +++++ haskell-indentation.el | 2 ++ haskell-interactive-mode.el | 5 +++++ haskell-load.el | 3 +++ w3m-haddock.el | 1 + 6 files changed, 22 insertions(+) diff --git a/haskell-debug.el b/haskell-debug.el index aa017c9e4..85e0e0d84 100644 --- a/haskell-debug.el +++ b/haskell-debug.el @@ -31,31 +31,37 @@ :link '(custom-manual "(haskell-mode)haskell-debug") :group 'haskell) +;;;###autoload (defface haskell-debug-warning-face '((t :inherit 'compilation-warning)) "Face for warnings." :group 'haskell-debug) +;;;###autoload (defface haskell-debug-trace-number-face '((t :weight bold :background "#f5f5f5")) "Face for numbers in backtrace." :group 'haskell-debug) +;;;###autoload (defface haskell-debug-newline-face '((t :weight bold :background "#f0f0f0")) "Face for newlines in trace steps." :group 'haskell-debug) +;;;###autoload (defface haskell-debug-keybinding-face '((t :inherit 'font-lock-type-face :weight bold)) "Face for keybindings." :group 'haskell-debug) +;;;###autoload (defface haskell-debug-heading-face '((t :inherit 'font-lock-keyword-face)) "Face for headings." :group 'haskell-debug) +;;;###autoload (defface haskell-debug-muted-face '((t :foreground "#999")) "Face for muteds." diff --git a/haskell-font-lock.el b/haskell-font-lock.el index 4692ceaa2..0baa9dfd7 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -92,11 +92,13 @@ This is the case if the \".\" is part of a \"forall . \"." (string= " " (string (char-after start))) (string= " " (string (char-before start)))))))) +;;;###autoload (defface haskell-keyword-face '((t :inherit font-lock-keyword-face)) "Face used to highlight Haskell keywords." :group 'haskell) +;;;###autoload (defface haskell-constructor-face '((t :inherit font-lock-type-face)) "Face used to highlight Haskell constructors." @@ -113,16 +115,19 @@ This is the case if the \".\" is part of a \"forall . \"." ;; This is probably just wrong, but it used to use ;; `font-lock-function-name-face' with a result that was not consistent with ;; other major modes, so I just exchanged with `haskell-definition-face'. +;;;###autoload (defface haskell-operator-face '((t :inherit font-lock-variable-name-face)) "Face used to highlight Haskell operators." :group 'haskell) +;;;###autoload (defface haskell-pragma-face '((t :inherit font-lock-preprocessor-face)) "Face used to highlight Haskell pragmas." :group 'haskell) +;;;###autoload (defface haskell-literate-comment-face '((t :inherit font-lock-doc-face)) "Face with which to fontify literate comments. diff --git a/haskell-indentation.el b/haskell-indentation.el index 05a38adce..0e269babd 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -67,11 +67,13 @@ modes (e.g. fill-column-indicator)." :type 'boolean :group 'haskell-indentation) +;;;###autoload (defface haskell-indentation-show-normal-face '((t :underline t)) "Default face for indentations overlay." :group 'haskell-indentation) +;;;###autoload (defface haskell-indentation-show-hl-line-face '((t :underline t :inherit hl-line)) "Face used for indentations overlay after EOL if hl-line mode is enabled." diff --git a/haskell-interactive-mode.el b/haskell-interactive-mode.el index ef9120c87..fddd525b8 100644 --- a/haskell-interactive-mode.el +++ b/haskell-interactive-mode.el @@ -130,26 +130,31 @@ be nil.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Faces +;;;###autoload (defface haskell-interactive-face-prompt '((t :inherit font-lock-function-name-face)) "Face for the prompt." :group 'haskell-interactive) +;;;###autoload (defface haskell-interactive-face-compile-error '((t :inherit compilation-error)) "Face for compile errors." :group 'haskell-interactive) +;;;###autoload (defface haskell-interactive-face-compile-warning '((t :inherit compilation-warning)) "Face for compiler warnings." :group 'haskell-interactive) +;;;###autoload (defface haskell-interactive-face-result '((t :inherit font-lock-string-face)) "Face for the result." :group 'haskell-interactive) +;;;###autoload (defface haskell-interactive-face-garbage '((t :inherit font-lock-string-face)) "Face for trailing garbage after a command has completed." diff --git a/haskell-load.el b/haskell-load.el index 76321620c..fd173d241 100644 --- a/haskell-load.el +++ b/haskell-load.el @@ -268,6 +268,7 @@ actual Emacs buffer of the module being loaded." (modules (split-string modules-string ", "))) (cons modules modules-string))) +;;;###autoload (defface haskell-error-face '((((supports :underline (:style wave))) :underline (:style wave :color "#dc322f")) @@ -276,6 +277,7 @@ actual Emacs buffer of the module being loaded." "Face used for marking error lines." :group 'haskell-mode) +;;;###autoload (defface haskell-warning-face '((((supports :underline (:style wave))) :underline (:style wave :color "#b58900")) @@ -284,6 +286,7 @@ actual Emacs buffer of the module being loaded." "Face used for marking warning lines." :group 'haskell-mode) +;;;###autoload (defface haskell-hole-face '((((supports :underline (:style wave))) :underline (:style wave :color "#6c71c4")) diff --git a/w3m-haddock.el b/w3m-haddock.el index 308e87f41..7004f6335 100644 --- a/w3m-haddock.el +++ b/w3m-haddock.el @@ -31,6 +31,7 @@ (add-hook 'w3m-display-hook 'w3m-haddock-display) +;;;###autoload (defface w3m-haddock-heading-face '((((class color)) :inherit magit-item-highlight)) "Face for quarantines." From 4a4e9aed7e59469087eee8d4e31f1ad53a7031ac Mon Sep 17 00:00:00 2001 From: William Kunkel Date: Mon, 3 Aug 2015 17:42:00 -0400 Subject: [PATCH 3/3] Add ;;;###autoload to each defgroup --- ghc-core.el | 1 + haskell-bot.el | 1 + haskell-cabal.el | 2 +- haskell-checkers.el | 1 + haskell-compile.el | 1 + haskell-customize.el | 2 ++ haskell-debug.el | 1 + haskell-decl-scan.el | 1 + haskell-doc.el | 1 + haskell-indent.el | 1 + haskell-indentation.el | 2 +- haskell-simple-indent.el | 1 + inf-haskell.el | 1 + tests/compat/ert.el | 1 + 14 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ghc-core.el b/ghc-core.el index 1d0e97c44..d0dd1c94f 100644 --- a/ghc-core.el +++ b/ghc-core.el @@ -32,6 +32,7 @@ (require 'haskell-mode) (require 'haskell-font-lock) +;;;###autoload (defgroup ghc-core nil "Major mode for viewing pretty printed GHC Core output." :link '(custom-manual "(haskell-mode)") diff --git a/haskell-bot.el b/haskell-bot.el index b0c1ea10c..5505e7b4b 100644 --- a/haskell-bot.el +++ b/haskell-bot.el @@ -72,6 +72,7 @@ (require 'comint) +;;;###autoload (defgroup haskell-bot nil "Major mode for interacting with an inferior Bot session." :group 'haskell diff --git a/haskell-cabal.el b/haskell-cabal.el index 6f7e40a51..6dccce80c 100644 --- a/haskell-cabal.el +++ b/haskell-cabal.el @@ -301,7 +301,7 @@ OTHER-WINDOW use `find-file-other-window'." "help" "run")) - +;;;###autoload (defgroup haskell-cabal nil "Haskell cabal files" :group 'haskell diff --git a/haskell-checkers.el b/haskell-checkers.el index 37cc1d117..ac4a28797 100644 --- a/haskell-checkers.el +++ b/haskell-checkers.el @@ -27,6 +27,7 @@ (require 'compile) +;;;###autoload (defgroup haskell-checkers nil "Run HLint as inferior of Emacs, parse error messages." :group 'haskell) diff --git a/haskell-compile.el b/haskell-compile.el index cdc630800..40ce23b22 100644 --- a/haskell-compile.el +++ b/haskell-compile.el @@ -29,6 +29,7 @@ (require 'compile) (require 'haskell-cabal) +;;;###autoload (defgroup haskell-compile nil "Settings for Haskell compilation mode" :link '(custom-manual "(haskell-mode)compilation") diff --git a/haskell-customize.el b/haskell-customize.el index 79f8c1c1c..dd3f3c172 100644 --- a/haskell-customize.el +++ b/haskell-customize.el @@ -28,6 +28,7 @@ :type 'boolean :group 'haskell-interactive) +;;;###autoload (defgroup haskell nil "Major mode for editing Haskell programs." :link '(custom-manual "(haskell-mode)") @@ -98,6 +99,7 @@ when showing type information about symbols." (defvar haskell-process-end-hook nil "Hook for when the haskell process ends.") +;;;###autoload (defgroup haskell-interactive nil "Settings for REPL interaction via `haskell-interactive-mode'" :link '(custom-manual "(haskell-mode)haskell-interactive-mode") diff --git a/haskell-debug.el b/haskell-debug.el index 85e0e0d84..f18cd42c6 100644 --- a/haskell-debug.el +++ b/haskell-debug.el @@ -26,6 +26,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Configuration +;;;###autoload (defgroup haskell-debug nil "Settings for debugging support." :link '(custom-manual "(haskell-mode)haskell-debug") diff --git a/haskell-decl-scan.el b/haskell-decl-scan.el index 14b8d0987..b20b6c0af 100644 --- a/haskell-decl-scan.el +++ b/haskell-decl-scan.el @@ -105,6 +105,7 @@ (require 'syntax) (require 'imenu) +;;;###autoload (defgroup haskell-decl-scan nil "Haskell declaration scanning (`imenu' support)." :link '(custom-manual "(haskell-mode)haskell-decl-scan-mode") diff --git a/haskell-doc.el b/haskell-doc.el index 1c08024de..7f2bee3fe 100644 --- a/haskell-doc.el +++ b/haskell-doc.el @@ -308,6 +308,7 @@ (require 'imenu) (require 'eldoc) +;;;###autoload (defgroup haskell-doc nil "Show Haskell function types in echo area." :group 'haskell diff --git a/haskell-indent.el b/haskell-indent.el index 6cdcf0e1a..3bef95c50 100644 --- a/haskell-indent.el +++ b/haskell-indent.el @@ -92,6 +92,7 @@ (defvar haskell-literate) +;;;###autoload (defgroup haskell-indent nil "Haskell indentation." :group 'haskell diff --git a/haskell-indentation.el b/haskell-indentation.el index 0e269babd..504cb7268 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -42,7 +42,7 @@ (defvar haskell-indentation-dyn-last-direction) (defvar haskell-indentation-dyn-last-indentations) - +;;;###autoload (defgroup haskell-indentation nil "Haskell indentation." :link '(custom-manual "(haskell-mode)Indentation") diff --git a/haskell-simple-indent.el b/haskell-simple-indent.el index 541f26caa..5d8a000ba 100644 --- a/haskell-simple-indent.el +++ b/haskell-simple-indent.el @@ -64,6 +64,7 @@ (require 'haskell-mode) +;;;###autoload (defgroup haskell-simple-indent nil "Simple Haskell indentation." :link '(custom-manual "(haskell-mode)Indentation") diff --git a/inf-haskell.el b/inf-haskell.el index fa42e8cbf..640a5b2e1 100644 --- a/inf-haskell.el +++ b/inf-haskell.el @@ -42,6 +42,7 @@ ;; Dynamically scoped variables. (defvar find-tag-marker-ring) +;;;###autoload (defgroup inferior-haskell nil "Settings for REPL interaction via `inferior-haskell-mode'" :link '(custom-manual "(haskell-mode)inferior-haskell-mode") diff --git a/tests/compat/ert.el b/tests/compat/ert.el index 9cbf417d8..fb8d37a06 100644 --- a/tests/compat/ert.el +++ b/tests/compat/ert.el @@ -66,6 +66,7 @@ ;;; UI customization options. +;;;###autoload (defgroup ert () "ERT, the Emacs Lisp regression testing tool." :prefix "ert-"