all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: bug#3971: 23.1.50; linum-mode kills right margin
Date: Thu, 30 Jul 2009 07:24:27 +0200	[thread overview]
Message-ID: <e01d8a50907292224n5e93e7a3uacb78c28877c3f58@mail.gmail.com> (raw)
In-Reply-To: <e01d8a50907292138u3a5c148fqd90abe3fdf388b51@mail.gmail.com>

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@gmail.com> 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'
>
>
>
>





  reply	other threads:[~2009-07-30  5:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f7ccd24b0909211709l2c1f9093g589cc838e137b8f6@mail.gmail.com>
2009-07-30  4:38 ` bug#3971: 23.1.50; linum-mode kills right margin Lennart Borgman
2009-07-30  5:24   ` Lennart Borgman [this message]
2009-09-22  0:20   ` bug#3971: marked as done (23.1.50; linum-mode kills right margin) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e01d8a50907292224n5e93e7a3uacb78c28877c3f58@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=3971@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.