What I've tried in .emacs (note: I don't know elisp, and just tried cobbling this stuff together from googling and from other people's stuff) is
(mouse-wheel-mode 't) ;;; mouse-wheel enabled
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;;; 1 line at a time
;;; (setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil)))
;;; (setq mouse-wheel-progressive-speed nil)
(setq mouse-wheel-follow-mouse 't) ;;; scroll window under mouse
(global-set-key (kbd "<mouse-4>") 'scroll-down-command)
(global-set-key (kbd "<mouse-5>") 'scroll-up-command)
The desired behavior is that every small mouse wheel movement should scroll up or down one line at a time. But it scrolls one screenful at a time. That is, the smallest mouse wheel motion scrolls the buffer up or down an entire screenful. How can I get one line at a time? I'm using emacs 24.5.1, and sometimes 24.3.1, under linux (slackware versions 14.2x64, and sometimes 14.1x32).
Edit @lawlist's suggestion in comments below worked when I tried an .emacs file with the one single line
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil)))
But my entire .emacs file must be doing something that defeats it, or that does some other bad thing. So below is my entire 50-line .emacs. What's wrong with it?...
(setq major-mode 'text-mode)
(setq auto-mode-alist '(("." . text-mode)))
(setq make-backup-files nil) ;;; no backup files
(setq auto-save-default nil) ;;; no auto saving
(setq scroll-step 1)
(setq scroll-margin 0)
(setq scroll-preserve-screen-position 't) ;;; scroll without moving cursor
(setq scroll-conservatively 10000) ;;; (0 or 10000 seems same)
(setq auto-window-vscroll nil)
(setq scroll-up nil)
(setq scroll-down nil)
(setq scroll-up-aggressively nil) ;;; used to be .01
(setq scroll-down-aggressively nil) ;;; used to be .01
;;; (setq track-eol nil) ;;; cursor doesn't track end-of-line
(setq next-screen-context-lines 0)
(mouse-wheel-mode 't) ;;; mouse-wheel enabled
;;; (setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;;; 1 line at a time
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil)))
;;; (setq mouse-wheel-progressive-speed nil)
(setq mouse-wheel-follow-mouse 't) ;;; scroll window under mouse
(global-set-key (kbd "<mouse-4>") 'scroll-down-command)
(global-set-key (kbd "<mouse-5>") 'scroll-up-command)
;;; (scroll-bar-mode -1) ;;; no scroll bar displayed at all
(setq indent-tabs-mode nil)
;;; see http://emacs.stackexchange.com/questions/
;;; 14297/completely-disable-all-auto-indentation
(global-set-key "\C-j" 'newline) ;;; disable auto-indent? emacs <=24.3
(electric-indent-mode 0) ;;; disable auto-indent? emacs >=24.4
(setq blink-matching-paren nil)
(setq column-number-mode 't)
(setq size-indication-mode 't)
;;; open with single window
(setq inhibit-startup-screen 't)
(add-hook 'emacs-startup-hook 'delete-other-windows)
;;; initial frame width,height,position
(set-frame-width (selected-frame) 80) ; #chars wide
(set-frame-height (selected-frame) 52) ; #lines ling
(set-frame-position (selected-frame) 10 10 ) ; x y from upper-left
;;; insert tab character
(defun insert-tab ()
(interactive)
(insert "\t"))
;;; (insert " "))
(global-unset-key [tab])
(global-set-key (kbd "TAB") 'insert-tab)
;;; --- end-of-file ---