|
bug#3971: 23.1.50; linum-mode kills right margin: msg#00600bug-gnu-emacs-gnu
Or, maybe it is better to redefine set-window-margins so that a nil argument for a margin means "don't touch"...? On Thu, Jul 30, 2009 at 6:38 AM, Lennart Borgman<lennart.borgman@xxxxxxxxx> wrote: > linum-mode kills the right margin. It should not touch it since it > does not use it. The following patch fixes this: > > Index: linum.el > =================================================================== > RCS file: /sources/emacs/emacs/lisp/linum.el,v > retrieving revision 1.11 > diff -c -b -r1.11 linum.el > *** linum.el  Â18 Jan 2009 01:45:38 -0000   Â1.11 > --- linum.el  Â30 Jul 2009 04:35:10 -0000 > *************** > *** 108,114 **** >  Â(mapc #'delete-overlay linum-overlays) >  Â(setq linum-overlays nil) >  Â(dolist (w (get-buffer-window-list (current-buffer) nil t)) > !   (set-window-margins w 0))) > > Â(defun linum-update-current () >  Â"Update line numbers for the current buffer." > --- 108,114 ---- >  Â(mapc #'delete-overlay linum-overlays) >  Â(setq linum-overlays nil) >  Â(dolist (w (get-buffer-window-list (current-buffer) nil t)) > !   (set-window-margins w 0 (cdr (window-margins w))))) > > Â(defun linum-update-current () >  Â"Update line numbers for the current buffer." > *************** > *** 163,169 **** >       Â(overlay-put ov 'linum-str str)))) >    Â(forward-line) >    Â(setq line (1+ line))) > !   (set-window-margins win width))) > > Â(defun linum-after-change (beg end len) >  Â;; update overlays on deletions, and after newlines are inserted > --- 163,169 ---- >       Â(overlay-put ov 'linum-str str)))) >    Â(forward-line) >    Â(setq line (1+ line))) > !   (set-window-margins win width (cdr (window-margins win))))) > > Â(defun linum-after-change (beg end len) >  Â;; update overlays on deletions, and after newlines are inserted > > > > In GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) > Âof 2009-06-30 > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > configured using `configure --with-gcc (3.4) --no-opt --cflags > -Ic:/g/include -fno-crossjumping' > > > >
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |