Variable: mpc-songs-mode-hook

mpc-songs-mode-hook is a variable defined in mpc.el.gz.

Value

nil

Documentation

Hook run after entering MPC-song mode.

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/mpc.el.gz
(define-derived-mode mpc-songs-mode mpc-mode "MPC-song"
  (setq mpc-songs-format-description
        (with-temp-buffer (mpc-format mpc-songs-format 'self) (buffer-string)))
  (setq-local header-line-format
              ;; '("MPC " mpc-volume " " mpc-current-song)
              (list (propertize " " 'display '(space :align-to 0))
                    ;; 'mpc-songs-format-description
                    '(:eval
                      (let ((hscroll (window-hscroll)))
                        (with-temp-buffer
                          (mpc-format mpc-songs-format 'self hscroll)
                          ;; That would be simpler than the hscroll handling in
                          ;; mpc-format, but currently move-to-column does not
                          ;; recognize :space display properties.
                          ;; (move-to-column hscroll)
                          ;; (delete-region (point-min) (point))
                          (buffer-string))))))
  (setq-local
   mode-line-format
   '("%e" mode-line-frame-identification mode-line-buffer-identification
     #("   " 0 3
       (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"))
     mode-line-position
     #("  " 0 2
       (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"))
     mpc-songs-totaltime
     mpc-current-updating
     #("   " 0 2
       (help-echo "mouse-1: Select (drag to resize)\nmouse-2: Make current window occupy the whole frame\nmouse-3: Remove current window from display"))
     (mpc--song-search
      (:propertize
       ("Search=\"" mpc--song-search "\"")
       help-echo "mouse-2: kill this search"
       follow-link t
       mouse-face mode-line-highlight
       keymap (keymap (mode-line keymap
                                 (mouse-2 . mpc-songs-kill-search))))
      (:propertize "NoSearch"
       help-echo "mouse-2: set a search restriction"
       follow-link t
       mouse-face mode-line-highlight
       keymap (keymap (mode-line keymap (mouse-2 . mpc-songs-search)))))))

  ;; (setq-local mode-line-process
  ;;      '("" ;; mpc-volume " "
  ;;        mpc-songs-totaltime
  ;;        mpc-current-updating))
  )