@@ -211,7 +211,7 @@ Return nil if no Cabal description file could be located via
211
211
" Search for package description file upwards starting from DIR.
212
212
If DIR is nil, `default-directory' is used as starting point for
213
213
directory traversal. Upward traversal is aborted if file owner
214
- changes. Uses`haskell-cabal-find-pkg-desc' internally."
214
+ changes. Uses `haskell-cabal-find-pkg-desc' internally."
215
215
(let ((use-dir (or dir default-directory)))
216
216
(while (and use-dir (not (file-directory-p use-dir)))
217
217
(setq use-dir (file-name-directory (directory-file-name use-dir))))
@@ -373,14 +373,14 @@ OTHER-WINDOW use `find-file-other-window'."
373
373
(goto-char (haskell-cabal-section-end)))
374
374
375
375
(defun haskell-cabal-next-section ()
376
- " Go to the next extion "
376
+ " Go to the next section "
377
377
(interactive )
378
378
(when (haskell-cabal-section-header-p) (forward-line ))
379
379
(while (not (or (eobp ) (haskell-cabal-section-header-p)))
380
380
(forward-line )))
381
381
382
382
(defun haskell-cabal-previous-section ()
383
- " Go to the next extion "
383
+ " Go to the next section "
384
384
(interactive )
385
385
(when (haskell-cabal-section-header-p) (forward-line -1 ))
386
386
(while (not (or (bobp ) (haskell-cabal-section-header-p)))
@@ -471,7 +471,7 @@ OTHER-WINDOW use `find-file-other-window'."
471
471
and execute FORMS
472
472
473
473
If REPLACE is non-nil the subsection data is replaced with the
474
- resultung buffer-content"
474
+ resulting buffer-content"
475
475
(let ((section (make-symbol " section" ))
476
476
(beg (make-symbol " beg" ))
477
477
(end (make-symbol " end" ))
@@ -502,7 +502,7 @@ resultung buffer-content"
502
502
(insert , section-data ))))))))
503
503
504
504
(defmacro haskell-cabal-each-line (&rest fun )
505
- " Execute FOMRS on each line"
505
+ " Execute FORMS on each line"
506
506
`(save-excursion
507
507
(while (< (point ) (point-max ))
508
508
,@fun
@@ -663,7 +663,7 @@ resultung buffer-content"
663
663
(haskell-cabal-forward-to-line-entry))
664
664
665
665
(defun haskell-cabal-previous-subsection ()
666
- " go to the next subsection"
666
+ " go to the previous subsection"
667
667
(interactive )
668
668
(if (haskell-cabal-header-p) (forward-line -1 ))
669
669
(while (and (not (bobp ))
@@ -674,7 +674,7 @@ resultung buffer-content"
674
674
675
675
676
676
(defun haskell-cabal-find-subsection-by (section pred )
677
- " Find sunsection with name NAME"
677
+ " Find subsection with name NAME"
678
678
(save-excursion
679
679
(when section (goto-char (haskell-cabal-section-start section)))
680
680
(let* ((end (if section (haskell-cabal-section-end) (point-max )))
@@ -688,7 +688,7 @@ resultung buffer-content"
688
688
found)))
689
689
690
690
(defun haskell-cabal-find-subsection (section name )
691
- " Find sunsection with name NAME"
691
+ " Find subsection with name NAME"
692
692
(let ((downcase-name (downcase name)))
693
693
(haskell-cabal-find-subsection-by
694
694
section
@@ -747,7 +747,11 @@ resultung buffer-content"
747
747
(marked-line (goto-char marked-line)))))
748
748
749
749
(defmacro haskell-cabal-with-subsection-line (replace &rest forms )
750
- " Mark line and "
750
+ " Mark line, copy subsection data into a temporary buffer, save indentation
751
+ and execute FORMS at the marked line.
752
+
753
+ If REPLACE is non-nil the subsection data is replaced with the
754
+ resulting buffer-content. Unmark line at the end."
751
755
`(progn
752
756
(haskell-cabal-mark)
753
757
(unwind-protect
@@ -937,7 +941,7 @@ Source names from main-is and c-sources sections are left untouched
937
941
'haskell-cabal-sort-lines-key-fun )))))))
938
942
939
943
(defun haskell-cabal-add-build-dependency (dependency &optional sort silent )
940
- " Add a build dependencies to sections "
944
+ " Add the given build dependency to every section "
941
945
(haskell-cabal-map-sections
942
946
(lambda (section )
943
947
(when (haskell-cabal-source-section-p section)
0 commit comments