Variable: tildify-mode-hook

tildify-mode-hook is a customizable variable defined in tildify.el.gz.

Value

nil

Documentation

Hook run after entering or leaving tildify-mode(var)/tildify-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/tildify.el.gz
;;;###autoload
(define-minor-mode tildify-mode
  "Adds electric behavior to space character.

When space is inserted into a buffer in a position where hard space is required
instead (determined by `tildify-space-pattern' and `tildify-space-predicates'),
that space character is replaced by a hard space specified by
`tildify-space-string'.  Converting of the space is done by `tildify-space'.

When `tildify-mode' is enabled, if `tildify-string-alist' specifies a hard space
representation for current major mode, the `tildify-space-string' buffer-local
variable will be set to the representation."
  :lighter " ~"
  (when tildify-mode
    (let ((space (with-suppressed-warnings ((obsolete
                                             tildify--pick-alist-entry))
                   (tildify--pick-alist-entry tildify-string-alist))))
      (if (not (string-equal " " (or space tildify-space-string)))
          (when space
            (setq tildify-space-string space))
        (message (concat "Hard space is a single space character, tildify-"
                         "mode won't have any effect, disabling."))
        (setq tildify-mode nil))))
  (if tildify-mode
      (add-hook 'post-self-insert-hook #'tildify-space nil t)
    (remove-hook 'post-self-insert-hook #'tildify-space t)))