Emacs folding mode error

I want to use the emacs folding mode provided by the folding.el function from http://www.emacswiki.org/emacs/FoldingMode

I put the following in a .emacs file:

(setq load-path (cons (concat (getenv "HOME") "/.emacs.d") load-path))
(load "folding")
(folding-mode-add-find-file-hook)
(folding-add-to-marks-list 'latex-mode   "%{"  "%}"  nil t)

Then when I select the area and run

M-x folding-fold-region

I get an error

Wrong type argument: char-or-string-p, nil
+3
source share
1 answer

There are two problems:

  • you do not need to re-declare labels for latex mode, as this is already done in folder.el line 4411 . So you have to delete the line(folding-add-to-marks-list 'latex-mode "%{" "%}" nil t)

  • Wrong type argument: char-or-string-p, nil, folder-mode . (folding-mode-add-find-file-hook) folder-mode . folder-mode, folded-file , , , lisp:

;; -*- folded-file: t; -*-

(folding-mode-add-find-file-hook) .emacs folder-mode, folding-fold-region .

C-h f folding-mode-add-find-file-hook RET, .

+5

Source: https://habr.com/ru/post/1761983/


All Articles