Personal emacs config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
3.2 KiB

  1. ;;; format-all-autoloads.el --- automatically extracted autoloads
  2. ;;
  3. ;;; Code:
  4. (add-to-list 'load-path (directory-file-name
  5. (or (file-name-directory #$) (car load-path))))
  6. ;;;### (autoloads nil "format-all" "format-all.el" (0 0 0 0))
  7. ;;; Generated autoloads from format-all.el
  8. (autoload 'format-all-buffer "format-all" "\
  9. Auto-format the source code in the current buffer.
  10. No disk files are touched - the buffer doesn't even need to be
  11. saved. If you don't like the results of the formatting, you can
  12. use ordinary undo to get your code back to its previous state.
  13. You will need to install external programs to do the formatting.
  14. If the command can't find the program that it needs, it will try
  15. to tell you how you might be able to install it on your operating
  16. system. Only BibTeX, Emacs Lisp and Ledger are formatted without an
  17. external program.
  18. A suitable formatter is selected according to the `major-mode' of
  19. the buffer. Many popular programming languages are supported.
  20. It is fairly easy to add new languages that have an external
  21. formatter.
  22. If any errors or warnings were encountered during formatting,
  23. they are shown in a buffer called *format-all-errors*." t nil)
  24. (autoload 'format-all-mode "format-all" "\
  25. Toggle automatic source code formatting before save.
  26. When this minor mode (FmtAll) is enabled, `format-all-buffer' is
  27. automatically called to format your code each time before you
  28. save the buffer.
  29. The mode is buffer-local and needs to be enabled separately each
  30. time a file is visited. You may want to use `add-hook' to add a
  31. function to your personal `after-change-major-mode-hook' in your
  32. `user-init-file' to enable the mode based on the buffer's
  33. `major-mode' and some `buffer-file-name' patterns. For example:
  34. (defvar my-auto-format-modes '(js-mode python-mode))
  35. (defvar my-auto-format-dirs '(\"foo\" \"bar\"))
  36. (defun my-auto-format-buffer-p ()
  37. (and (member major-mode my-auto-format-modes)
  38. (buffer-file-name)
  39. (save-match-data
  40. (let ((dir (file-name-directory (buffer-file-name))))
  41. (cl-some (lambda (regexp) (string-match regexp dir))
  42. my-auto-format-dirs)))))
  43. (defun my-after-change-major-mode ()
  44. (format-all-mode (if (my-auto-format-buffer-p) 1 0)))
  45. (add-hook 'after-change-major-mode-hook 'my-after-change-major-mode)
  46. When `format-all-mode' is called as a Lisp function, the mode is
  47. toggled if ARG is toggle, disabled if ARG is a negative integer
  48. or zero, and enabled otherwise.
  49. \(fn &optional ARG)" t nil)
  50. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "format-all" '("asmfmt" "bibtex-mode" "black" "brittany" "buildifier" "cmake-format" "crystal" "dartfmt" "define-format-all-formatter" "dfmt" "dhall" "dockfmt" "elm-format" "emacs-lisp" "fish-indent" "format-all-" "fprettify" "gofmt" "html-tidy" "istyle-verilog" "ktlint" "latexindent" "ledger-mode" "lua-fmt" "mix-format" "nixfmt" "ocp-indent" "perltidy" "prettier" "purty" "rufo" "rustfmt" "scalafmt" "shfmt" "sqlformat" "styler" "swiftformat" "terraform-fmt")))
  51. ;;;***
  52. ;; Local Variables:
  53. ;; version-control: never
  54. ;; no-byte-compile: t
  55. ;; no-update-autoloads: t
  56. ;; coding: utf-8
  57. ;; End:
  58. ;;; format-all-autoloads.el ends here