unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13446: 24.2; Fix loop test in linum.el
@ 2013-01-15  1:13 Nathan Trapuzzano
  2013-10-25 15:26 ` Nathan Trapuzzano
  0 siblings, 1 reply; 8+ messages in thread
From: Nathan Trapuzzano @ 2013-01-15  1:13 UTC (permalink / raw)
  To: 13446

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

There is an incorrect loop test in linum.el that potentially applies an
overlay to a line not visible in the window and thereby messes up the
width of the overlays in the lines that are visible. The patch/merge
directive is attached, and what follows is the commit message:

-----

Modify loop test in `linum-update-window'.

`limit' is set to the position returned by `window-end'; this position
is either on the last visible (logical) line in the buffer or is the
first position on the line following the last visible line. In the
former case, the loop variable never reaches the value of `limit', but
in the latter case, an overlay is applied to a line that is not
visible in the window. This can mess up the width of the overlay on
the visible lines, especially if the width of the line number (as a
string) of the line that's not visible is different from the width of
the visible lines' line numbers.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: linum.patch --]
[-- Type: text/x-patch, Size: 1105 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: nbtrap@nbtrap.com-20130115010121-h7kwjyr5kimowgml
# target_branch: .
# testament_sha1: a9154d3ede2b389220646bb8e9e708117d876d01
# timestamp: 2013-01-14 20:03:26 -0500
# base_revision_id: nbtrap@nbtrap.com-20130111013646-pn4xh5r94x5asomb
# 
# Begin patch
=== modified file 'lisp/linum.el'
--- lisp/linum.el	2012-01-19 07:21:25 +0000
+++ lisp/linum.el	2013-01-15 00:45:27 +0000
@@ -151,7 +151,7 @@
     (run-hooks 'linum-before-numbering-hook)
     ;; Create an overlay (or reuse an existing one) for each
     ;; line visible in this window, if necessary.
-    (while (and (not (eobp)) (<= (point) limit))
+    (while (and (not (eobp)) (< (point) limit))
       (let* ((str (if fmt
                       (propertize (format fmt line) 'face 'linum)
                     (funcall linum-format line)))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdjgvvgAABJfgAAQQGFxUBIA
AACv794QIABkRTaajamQyGjTaRiFGgBMBBkwQhDmaVnH5r9hMFQyJ7EUzThiw4Ixc/mQVpexbPS2
9yLLTxaFbWvXcN2zcydOQxpD652acQC4g4Z96jI5BipgKAAiM5Zz45Kd/4u5IpwoSGxwX3wA

^ permalink raw reply	[flat|nested] 8+ messages in thread
* bug#13454: 24.2; Small fix to reference manual
@ 2013-01-15  5:36 Nathan Trapuzzano
  2013-10-26 21:44 ` bug#13446: 24.2; Fix loop test in linum.el Nathan Trapuzzano
  0 siblings, 1 reply; 8+ messages in thread
From: Nathan Trapuzzano @ 2013-01-15  5:36 UTC (permalink / raw)
  To: 13454

[-- Attachment #1: Type: text/plain, Size: 59 bytes --]

See attached patch for small fix to Emacs reference manual.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: custom.patch --]
[-- Type: text/x-patch, Size: 650 bytes --]

=== modified file 'doc/emacs/custom.texi'
--- doc/emacs/custom.texi	2012-06-11 06:48:47 +0000
+++ doc/emacs/custom.texi	2013-01-15 05:30:01 +0000
@@ -552,8 +552,8 @@
 between various collections of settings, and to transfer such
 collections from one computer to another.
 
-  A Custom theme is stored an Emacs Lisp source file.  If the name of
-the Custom theme is @var{name}, the theme file is named
+  A Custom theme is stored as an Emacs Lisp source file.  If the name
+of the Custom theme is @var{name}, the theme file is named
 @file{@var{name}-theme.el}.  @xref{Creating Custom Themes}, for the
 format of a theme file and how to make one.
 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-10-28  0:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15  1:13 bug#13446: 24.2; Fix loop test in linum.el Nathan Trapuzzano
2013-10-25 15:26 ` Nathan Trapuzzano
2013-10-27  4:20   ` Stefan Monnier
2013-10-27 11:54     ` Nathan Trapuzzano
2013-10-27 13:39       ` Stefan Monnier
2013-10-27 19:36         ` Nathan Trapuzzano
2013-10-28  0:36           ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2013-01-15  5:36 bug#13454: 24.2; Small fix to reference manual Nathan Trapuzzano
2013-10-26 21:44 ` bug#13446: 24.2; Fix loop test in linum.el Nathan Trapuzzano

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).