Mercurial > emacs
annotate lispref/permute-index @ 51207:7e176ef34c10
Make (many) trivial substitutions for renamed and
new macros in dispextern.h, frame.h and window.h.
(make_window): Initialize new members
left_margin_cols, right_margin_cols, left_fringe_width,
right_fringe_width, fringes_outside_margins, scroll_bar_width,
and vertical_scroll_bar_type.
(coordinates_in_window): Adapted to new fringe/margin positions
and per-window fringes and scroll-bars.
Fix bug related to incorrectly adjusting coordinates by
frame's internal_border_width (the effect normally negible since
the internal_border_width is typically 0 or 1 pixel, but very
noticeable for an internal_border_width of e.g. 25 pixels).
Upon successful return (other than ON_NOTHING), the coordinates
are now always properly converted to window relative for the
given display element.
(window_from_coordinates): Add new parameters wx and wy to
return the window relative x and y position in the returned
window and part. A null arg means, don't return the position.
All callers changed.
(adjust_window_margins): New function which may reduce the width
of the display margins if a window's text area is too small after
resizing or splitting windows.
(size_window): Fix bug that did not account for display margin
widths when checking the minimum width of a window; use
adjust_window_margins.
(set_window_buffer): Call Fset_window_fringes and
Fset_window_scroll_bars to setup per-window elements.
Add new arg KEEP_MARGINS_P. Non-nil means to keep window's
existing display margin, fringe widths, and scroll bar settings
(e.g. after splitting a window or resizing the frame). All
callers changed.
(Fset_window_buffer): New arg KEEP_MARGINS. All callers changed.
(Fsplit_window): Duplicate original window's display margin,
fringe, and scroll-bar settings; then call Fset_window_buffer with
KEEP_MARGINS non-nil. This fixes a bug which caused a split
window to only preserve the display margins in one of the windows.
When splitting horisontally, call adjust_window_margins on both
windows to ensure that the text area of the new windows is non too
narrow. This fixes a bug which could cause emacs to trap if the
width of the split window was less than the width of the display
margins.
(window_box_text_cols): Renamed from window_internal_width. All
uses changed. Adapt to per-window fringes and scroll bars.
Fix bug that caused vertical separator to be subtracted also on
window frames. Fix another bug that did not reduce the returned
value by the columns used for display margins.
(window_scroll_line_based): Fix bug related to scrolling too much
when display margins are present (implicitly fixed by the fix to
window_box_text_cols).
(scroll_left, scroll_right): Fix bug related to scrolling too far
by default when display margins are present (implicitly fixed by
the fix to window_box_text_cols).
(struct saved_window): Rename members left to left_col, top to
top_line, width to total_cols, height to total_lines, orig_top to
orig_top_line, orig_height to orig_total_lines. All uses changed.
New members left_margin_cols, right_margin_cols,
left_fringe_width, right_fringe_width, fringes_outside_margins,
scroll_bar_width, and vertical_scroll_bar_type for saving
per-window display elements.
(Fset_window_configuration): Restore display margins, fringes,
and scroll bar settings. This fixes a bug which caused display
margins to be discarded when saving and restoring a window
configuration.
(save_window_save): Save display margins, fringes, and scroll bar
settings. This fixes a bug which caused display margins to be
discarded when saving and restoring a window configuration.
(Fset_window_margins): Do nothing if display margins are not
really changed. Otherwise, call adjust_window_margins to ensure
the text area doesn't get too narrow. This fixes a bug which
could cause emacs to trap if setting display margins wider than
the width of the window.
(Fset_window_fringes): New defun to allow user to specifically set
this window's fringe widths and position vs. display margins.
(Fwindow_fringes): New defun to return window's actual fringe
settings.
(Fset_window_scroll_bars): New defun to allow user to specifically
set this window's scroll bar width and position.
(Fwindow_scroll_bars): New defun to return window's actual scroll
bar settings.
(compare_window_configurations): Also compare display margins,
fringes, and scroll bar settings.
(syms_of_window): Defsubr new defuns for fringe and scroll bars.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sat, 24 May 2003 22:07:51 +0000 |
parents | 23a1cea22d13 |
children |
rev | line source |
---|---|
41200
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
1 #!/bin/sh |
41131 | 2 # Generate a permuted index of all names. |
3 # The result is a file called index.fns. | |
4 | |
5 # Copyright (C) 2001 Free Software Foundation, Inc. | |
6 # | |
7 # This file is part of GNU Emacs. | |
8 # | |
9 # GNU Emacs is free software; you can redistribute it and/or modify | |
10 # it under the terms of the GNU General Public License as published by | |
11 # the Free Software Foundation; either version 2, or (at your option) | |
12 # any later version. | |
13 # | |
14 # GNU Emacs is distributed in the hope that it will be useful, | |
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 # GNU General Public License for more details. | |
18 # | |
19 # You should have received a copy of the GNU General Public License | |
20 # along with GNU Emacs; see the file COPYING. If not, write to the | |
21 # Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
22 # Boston, MA 02111-1307, USA. | |
23 | |
24 # You will need to modify this for your needs. | |
25 | |
26 | |
27 set TEXINDEX=texindex # path to texindex command | |
28 #set EMACS=gnuemacs # your emacs command | |
29 #set TEX=tex # your tex command | |
30 | |
31 set MANUAL=elisp # the base name of the manual | |
32 | |
33 # goto 3 | |
34 | |
35 1: | |
36 echo "Extract raw index from texinfo fn index." | |
37 # Let texindex combine duplicate entries, later. | |
38 # But it wants to protect non-alphanumerics thus confusing ptx. | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
41200
diff
changeset
|
39 # Also change `\ ' to just a ` ', since texindex will fail. This is produced |
41131 | 40 # by `@findex two words' in an example environment (no doubt among others). |
41 # delete wrapper parens | |
42 # change dots {} to dots{} | |
43 # change {-} to char form, so ptx wont ignore it. | |
44 # delete leading \entry { | |
45 # change '\ ' to ' ' | |
46 # change lines with = < > since they mess up field extraction. | |
47 # separate into fields delimited by " | |
41200
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
48 rm -f permuted.raw |
41131 | 49 cat ${MANUAL}.fn | \ |
50 sed \ | |
51 -e 's/(\([^)]*\))/\1/' \ | |
52 -e 's/\\dots {}/(\\dots{})/' \ | |
53 -e "s/{-}/{{\\tt\\char'055}}/" \ | |
54 -e 's,^[^ ]* {,,' \ | |
55 -e 's, },},' \ | |
56 -e 's,\\ , ,g' \ | |
57 -e 's/{\\tt\\char61}/=/' \ | |
58 -e 's/{\\tt\\gtr}/>/' \ | |
59 -e 's/{\\tt\\less}/</' \ | |
60 -e 's/}{/"/g' \ | |
41200
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
61 | awk -F\" '{print $2, $1}' > permuted.raw |
41131 | 62 |
63 2: | |
64 # Build break file for ptx. | |
65 cat <<EOF > permuted.break | |
66 - | |
67 : | |
68 EOF | |
69 # Build the ignore file for ptx. | |
41200
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
70 # We would like to ignore "and", "or", and "for", |
41131 | 71 # but ptx ignores ignore words even if they stand alone. |
72 cat <<EOF > permuted.ignore | |
73 the | |
74 in | |
75 to | |
76 as | |
77 a | |
78 an | |
79 of | |
80 on | |
81 them | |
82 how | |
83 from | |
84 by | |
85 EOF | |
86 | |
87 echo "Make troff permuted index." | |
41200
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
88 rm -f permuted.t |
41131 | 89 ptx -i permuted.ignore -b permuted.break -f -r -w 144 \ |
41200
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
90 < permuted.raw > permuted.t |
41131 | 91 |
92 3: | |
93 echo "Extract the desired fields." | |
41200
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
94 rm -f permuted.fields |
c189486396ff
Don't depend on csh-specific features. Replace
Eli Zaretskii <eliz@gnu.org>
parents:
41131
diff
changeset
|
95 awk -F\" '{printf "%s\"%s\"%s\n", $4,$6,$9}' permuted.t > permuted.fields |
41131 | 96 |
97 4: | |
98 echo "Format for texindex." | |
99 # delete lines that start with "and ", "for " | |
100 sed < permuted.fields \ | |
101 -e 's/=/{\\tt\\char61}/' \ | |
102 -e 's/>/{\\tt\\gtr}/' \ | |
103 -e 's/</{\\tt\\less}/' \ | |
104 -e '/"and /d' \ | |
105 -e '/"for /d' \ | |
106 | awk -F\" 'NF>0 {if ($1=="") {\ | |
107 print "\entry {" $2 "}{" 0+$3 "}{" $2 "}" }\ | |
108 else {\ | |
109 print "\entry {" $2 ", " $1 "}{" 0+$3 "}{" $2 ", " $1 "}"} }'\ | |
110 > permuted.fn | |
111 | |
112 5: | |
113 echo "Sort with texindex." | |
114 ${TEXINDEX} permuted.fn | |
115 #mv permuted.fns ${MANUAL}.fns | |
116 | |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
41200
diff
changeset
|
117 # The resulting permuted.fns will be read when we run TeX |
41131 | 118 # on the manual the second time. Or you can use permuted.texinfo here. |
119 #${TEX} permuted.texinfo | |
120 | |
121 6: | |
122 echo "Clean up." | |
123 rm -f permuted.fields permuted.t permuted.raw | |
124 rm -f permuted.break permuted.ignore permuted.fn |