Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add command turn-on-fci-mode-with-column #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions fill-column-indicator.el
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,26 @@ on troubleshooting.)"
(interactive)
(fci-mode 1))

;;;###autoload
(defun turn-on-fci-mode-with-column (&optional column)
"Turn on fci-mode with setting `fci-rule-column' unconditionally."
(interactive
(list (read-string (format "Column (%s): "
(or fci-rule-column fill-column))
nil nil fci-rule-column)))
(when (stringp column)
(setq column (cond ((string= column "")
nil)
((string-match "\\`[0-9]+\\'" column)
(string-to-number column))
(t
column))))
(if (and column
(not (fci-posint-p column)))
(message "Column is not a interger.")
(setq fci-rule-column column)
(fci-mode 1)))

(defun turn-off-fci-mode ()
"Turn off fci-mode unconditionally."
(interactive)
Expand Down