-;; Time-stamp: <2016-08-23 15:54:14 kmodi>
+;; Time-stamp: <2016-08-24 13:30:33 kmodi>
 
 ;; Windows and buffers manipulation
 

If LN is positive, scroll the buffer up.
If LN is negative, scroll the buffer down."
  (interactive "p")
  (let (is-other-window-showing-pdf)
    (with-selected-window (other-window-for-scrolling)
      (when (setq is-other-window-showing-pdf (derived-mode-p 'pdf-view-mode))
        (if (>= ln 1)
            (pdf-view-next-line-or-next-page ln)
          (pdf-view-previous-line-or-previous-page (- ln)))))
    (when (not is-other-window-showing-pdf)
      (scroll-other-window ln))))

(defalias 'modi/scroll-other-window-up 'modi/scroll-other-window)

  (interactive "p")
  (scroll-down ln))

;; https://github.com/politza/pdf-tools/issues/227#issuecomment-242100968
(defun modi/scroll-other-window (ln)
  "Scroll the buffer in other window.

