Function: haskell-cabal-subsection-arrange-lines
haskell-cabal-subsection-arrange-lines is an interactive and natively
compiled function defined in haskell-cabal.el.
Signature
(haskell-cabal-subsection-arrange-lines)
Documentation
Sort lines of current subsection
Key Bindings
haskell-cabal-mode-map C-c C-s
Source Code
;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-cabal.el
(defun haskell-cabal-subsection-arrange-lines ()
"Sort lines of current subsection"
(interactive)
(haskell-cabal-save-position
(let* ((subsection (haskell-cabal-section-name (haskell-cabal-subsection)))
(compare-lines (if (string= (downcase subsection) "build-depends")
'haskell-cabal-sort-lines-depends-compare
nil)))
(haskell-cabal-with-subsection
(haskell-cabal-subsection) t
(haskell-cabal-with-cs-list
(sort-subr nil 'forward-line 'end-of-line
'haskell-cabal-sort-lines-key-fun
'end-of-line
compare-lines
))))))