* lisp/mpc.el (mpc-volume-mouse-set): Force volume to an integer
divisible by 'mpc-volume-step'.
(mpc-volume-step): Add docstring.
(when (buffer-live-p status-buf)
(with-current-buffer status-buf (force-mode-line-update)))))
-(defvar mpc-volume-step 5)
+(defvar mpc-volume-step 5
+ "Change volume in increments of this integer.")
(defun mpc-volume-mouse-set (&optional event)
"Change volume setting."
'(?◁ ?<))
(- mpc-volume-step) mpc-volume-step))
(curvol (string-to-number (cdr (assq 'volume mpc-status))))
- (newvol (max 0 (min 100 (+ curvol diff)))))
+ (newvol (max 0 (min 100 (+ (- curvol (mod curvol diff)) diff)))))
(if (= newvol curvol)
(progn
(message "MPD volume already at %s%%" newvol)