* bug#8987: 24.0.50; texinfo-insert-menu inserts unnecessary trailing spaces
@ 2011-07-02 18:42 emacs18
2011-07-03 16:12 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: emacs18 @ 2011-07-02 18:42 UTC (permalink / raw
To: 8987
texinfo-all-menus-update is a command that updates all menus within a
texinfo buffer. This command calls texinfo-insert-menu in turn to
update each menu. The problem with the latter is that it inserts
unnecessary white spaces at the end of most menu items following
double-colon. For example see bzr version 104838 of emacs trunk checked
in on July 1, 2011 where someone checked in cc-mode.texi with trailing
white spaces.
This problem has existed for many years. I know, because I suffered
through it many times myself. So I looked for a solution and it seems
like making one line change should fix this as shown below.
In emacs-lisp empty string evaluates to boolean true unlike python,
so that one cannot simply test boolean value of a string to detect
empty string verses non-empty string. It looks like testing the
(length) being greater than 0 seems to get the job done.
=== modified file 'lisp/textmodes/texnfo-upd.el'
--- lisp/textmodes/texnfo-upd.el 2011-01-25 04:08:28 +0000
+++ lisp/textmodes/texnfo-upd.el 2011-07-02 18:30:47 +0000
@@ -687,7 +687,7 @@
(insert (format "%s: %s." (car node-part) (cdr node-part)))))
;; Insert the description, if present.
- (when (cdr menu)
+ (when (> (length (cdr menu)) 0)
;; Move to right place.
(indent-to texinfo-column-for-description 2)
;; Insert description.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#8987: 24.0.50; texinfo-insert-menu inserts unnecessary trailing spaces
2011-07-02 18:42 bug#8987: 24.0.50; texinfo-insert-menu inserts unnecessary trailing spaces emacs18
@ 2011-07-03 16:12 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-03 16:12 UTC (permalink / raw
To: emacs18; +Cc: 8987
emacs18@gmail.com, Richard Kim <emacs18@gmail.com> writes:
> In emacs-lisp empty string evaluates to boolean true unlike python,
> so that one cannot simply test boolean value of a string to detect
> empty string verses non-empty string. It looks like testing the
> (length) being greater than 0 seems to get the job done.
Thanks for the patch; I've applied it to Emacs 24.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-03 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-02 18:42 bug#8987: 24.0.50; texinfo-insert-menu inserts unnecessary trailing spaces emacs18
2011-07-03 16:12 ` Lars Magne Ingebrigtsen
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.