I'm trying to understand this value assignment:

(setq mouse-wheel-scroll-amount '(2 ((shift) . 1)))

I know that shift is a bitwise shift. But I don't understand what is the result of this operation here (what is the value of mouse-wheel-scroll-amount). And for that matter, why did the coder decide to use this operation rather than giving a decimal value here.

  • C-h v mouse-wheel-scroll-amount – Drew May 18 '16 at 1:45

shift in this case is a symbol, not a function. Note that the variable is given a quoted list, so nothing inside is evaluated.

From the documentation of this variable (which you can access via describe-variable), you can give different amounts of scrolling for different (keyboard) modifiers.

In this case, the normal scroll is 2 lines, or 1 if SHIFT is pressed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.