Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Parinfer-mode insists on breaking this code in indent mode #57

Description

@Northcode

I have this code in my emacs config:

(setq-default mode-line-format
	      '("    "
		(:eval (case evil-state
			 ('normal "N")
			 ('insert "I")
			 ('visual "V")
			 ('emacs  "E")))
		" %04l %n "
		"    "
		(:propertize (:eval (if buffer-read-only " RO: "))
			     face font-lock-warning-face)
		(:propertize "%b"
			     face font-lock-keyword-face)
		" "
		(:eval (if (buffer-modified-p) "(!!)"))
		" "
		(:propertize
		 (:eval (when (magit-get-current-branch)
			  (concat " [" (magit-get-current-branch) "]")))
		 face font-lock-string-face)
		" :: "
		(:propertize "%m"
			     face font-lock-constant-face)
		" %e "
		(:eval (format-time-string "%H:%M" (current-time)))
		" %-"))

Whenever I switch to parinfer-indent-mode it breaks the parens, and makes it impossible to get the correct parens back for the first case sexp, it forces 3 closing parens at the end of the line and no matter how I indent the 4 cases underneath the parens dont seem to be affected.

The entire block turns into this:

(setq-default mode-line-format
        '("    ")
    (:eval (case evil-state)
       ('normal "N")
       ('insert "I")
       ('visual "V")
       ('emacs  "E"))
    " %04l %n "
    "    "
    (:propertize (:eval (if buffer-read-only " RO: "))
           face font-lock-warning-face)
    (:propertize "%b"
           face font-lock-keyword-face)
    " "
    (:eval (if (buffer-modified-p) "(!!)"))
    " "
    (:propertize
     (:eval (when (magit-get-current-branch))
        (concat " [" (magit-get-current-branch) "]"))
     face font-lock-string-face)
    " :: "
    (:propertize "%m"
           face font-lock-constant-face)
    " %e "
    (:eval (format-time-string "%H:%M" (current-time)))
    " %-")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions