aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2007-05-25 05:05:41 +0000
committerMiles Bader2007-05-25 05:05:41 +0000
commit779903bd6e149edae6131f84f2a1ac069ef50b2e (patch)
tree3aed1ae75329d705bd13fa9a4b4bd1708d8013c7
parente549150450fc7e406cc2876e9a03e7e7dd1569ea (diff)
parentc1587aff5527edb84ff15694c318aaabe9cc6d8d (diff)
downloademacs-779903bd6e149edae6131f84f2a1ac069ef50b2e.tar.gz
emacs-779903bd6e149edae6131f84f2a1ac069ef50b2e.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 771-772) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 26-27) - Update from CVS - lisp/vc-hooks.el (vc-find-root): Fix file attribute test Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-210
-rw-r--r--ChangeLog4
-rwxr-xr-xadmin/nt/dump.bat2
-rwxr-xr-xadmin/nt/makedist.bat17
-rw-r--r--lisp/ChangeLog21
-rw-r--r--lisp/image-mode.el169
-rw-r--r--lisp/textmodes/flyspell.el3
-rw-r--r--lisp/vc-hooks.el2
-rwxr-xr-xmkinstalldirs158
-rw-r--r--src/ChangeLog4
-rw-r--r--src/image.c2
10 files changed, 342 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 6794c49b47f..4cb809efc12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12007-05-25 Chong Yidong <cyd@stupidchicken.com>
2
3 * mkinstalldirs: Sync to version in automake CVS.
4
12007-05-22 Andreas Schwab <schwab@suse.de> 52007-05-22 Andreas Schwab <schwab@suse.de>
2 6
3 * configure.in: Prefer build_alias over host when host_alias is 7 * configure.in: Prefer build_alias over host when host_alias is
diff --git a/admin/nt/dump.bat b/admin/nt/dump.bat
index b332e7471f6..49d83e24651 100755
--- a/admin/nt/dump.bat
+++ b/admin/nt/dump.bat
@@ -10,8 +10,6 @@ ren emacs.exe emacs.exe.orig
10 10
11:dump 11:dump
12rem Overwrites emacs.exe if still present 12rem Overwrites emacs.exe if still present
13mkdir ..\lib-src
14copy fns* ..\lib-src
15mkdir obj 13mkdir obj
16mkdir obj\i386 14mkdir obj\i386
17mkdir obj\etc 15mkdir obj\etc
diff --git a/admin/nt/makedist.bat b/admin/nt/makedist.bat
index b160da93c4f..56fca7949fa 100755
--- a/admin/nt/makedist.bat
+++ b/admin/nt/makedist.bat
@@ -25,8 +25,6 @@ rem along with GNU Emacs; see the file COPYING. If not, write to the
25rem Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 25rem Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26rem Boston, MA 02110-1301, USA. 26rem Boston, MA 02110-1301, USA.
27 27
28set ZIP=zip
29
30if (%3) == () goto usage 28if (%3) == () goto usage
31if not (%4) == () goto %4 29if not (%4) == () goto %4
32 30
@@ -34,18 +32,25 @@ if not (%4) == () goto %4
34 32
35echo Create full bin distribution 33echo Create full bin distribution
36copy %3\README.W32 emacs-%1\README.W32 34copy %3\README.W32 emacs-%1\README.W32
37 35rem Info-ZIP zip seems to be broken on Windows.
38%ZIP% -x emacs.mdp -x *.pdb -x *.opt -x *~ -x CVS -9 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp %2-bin-i386.zip 36rem It always writes to zip.zip and treats the zipfile argument as one
37rem of the files to go in it.
38rem zip -9 -r %2-bin-i386 emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim -x emacs.mdp *.pdb *.opt *~ CVS
397z a -tZIP -mx=9 -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory %2-bin-i386.zip emacs-%1/BUGS emacs-%1/README emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc emacs-%1/info emacs-%1/lisp emacs-%1/leim
39del emacs-%1\README.W32 40del emacs-%1\README.W32
40if not (%4) == () goto end 41if not (%4) == () goto end
41 42
42:barebin 43:barebin
43
44echo Create archive with just the basic binaries and generated files 44echo Create archive with just the basic binaries and generated files
45echo (the user needs to unpack the full source distribution for 45echo (the user needs to unpack the full source distribution for
46echo everything else) 46echo everything else)
47copy %3\README.W32 emacs-%1\README.W32 47copy %3\README.W32 emacs-%1\README.W32
48%ZIP% -9 emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC emacs-%1/etc/DOC-X %2-barebin-i386.zip 48copy %3\dump.bat emacs-%1\bin\dump.bat
49rem Info-ZIP zip seems to be broken on Windows.
50rem It always writes to zip.zip and treats the zipfile argument as one
51rem of the files to go in it.
52rem zip -9 -r %2-barebin-i386.zip emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC-X
537z a -tZIP -mx=9 %2-barebin-i386.zip emacs-%1/README.W32 emacs-%1/bin emacs-%1/etc/DOC-X
49del emacs-%1\README.W32 54del emacs-%1\README.W32
50if not (%4) == () goto end 55if not (%4) == () goto end
51 56
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 98adf1a4da4..be975f67e99 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,24 @@
12007-05-25 Miles Bader <miles@fencepost.gnu.org>
2
3 * vc-hooks.el (vc-find-root): Fix file attribute test.
4
52007-05-24 Richard Stallman <rms@gnu.org>
6
7 * textmodes/flyspell.el (flyspell-correct-word-before-point):
8 Don't let opoint be nil.
9 (flyspell-emacs-popup): Explicit error if no dialogs.
10
112007-05-24 Chong Yidong <cyd@stupidchicken.com>
12
13 * image-mode.el (image-forward-hscroll, image-backward-hscroll)
14 (image-next-line, image-previous-line, image-scroll-up)
15 (image-scroll-down, image-bol, image-eol, image-bob, image-eob):
16 New functions.
17 (image-mode-map): Remap motion commands.
18 (image-mode-text-map): New keymap for viewing images as text.
19 (image-mode): Use image-mode-map.
20 (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps.
21
12007-05-24 Stefan Monnier <monnier@iro.umontreal.ca> 222007-05-24 Stefan Monnier <monnier@iro.umontreal.ca>
2 23
3 * textmodes/fill.el (canonically-space-region): Make the second arg 24 * textmodes/fill.el (canonically-space-region): Make the second arg
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 5ff35258c54..6ac864172d8 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -43,11 +43,162 @@
43;;;###autoload (push '("\\.p[bpgn]m\\'" . image-mode) auto-mode-alist) 43;;;###autoload (push '("\\.p[bpgn]m\\'" . image-mode) auto-mode-alist)
44;;;###autoload (push '("\\.x[bp]m\\'" . image-mode-maybe) auto-mode-alist) 44;;;###autoload (push '("\\.x[bp]m\\'" . image-mode-maybe) auto-mode-alist)
45 45
46;;; Image scrolling functions
47
48(defun image-forward-hscroll (&optional n)
49 "Scroll image in current window to the left by N character widths.
50Stop if the right edge of the image is reached."
51 (interactive "p")
52 (cond ((= n 0) nil)
53 ((< n 0)
54 (set-window-hscroll (selected-window)
55 (max 0 (+ (window-hscroll) n))))
56 (t
57 (let* ((image (get-text-property 1 'display))
58 (edges (window-inside-edges))
59 (win-width (- (nth 2 edges) (nth 0 edges)))
60 (img-width (ceiling (car (image-size image)))))
61 (set-window-hscroll (selected-window)
62 (min (max 0 (- img-width win-width))
63 (+ n (window-hscroll))))))))
64
65(defun image-backward-hscroll (&optional n)
66 "Scroll image in current window to the right by N character widths.
67Stop if the left edge of the image is reached."
68 (interactive "p")
69 (image-forward-hscroll (- n)))
70
71(defun image-next-line (&optional n)
72 "Scroll image in current window upward by N lines.
73Stop if the bottom edge of the image is reached."
74 (interactive "p")
75 (cond ((= n 0) nil)
76 ((< n 0)
77 (set-window-vscroll (selected-window)
78 (max 0 (+ (window-vscroll) n))))
79 (t
80 (let* ((image (get-text-property 1 'display))
81 (edges (window-inside-edges))
82 (win-height (- (nth 3 edges) (nth 1 edges)))
83 (img-height (ceiling (cdr (image-size image)))))
84 (set-window-vscroll (selected-window)
85 (min (max 0 (- img-height win-height))
86 (+ n (window-vscroll))))))))
87
88(defun image-previous-line (&optional n)
89 "Scroll image in current window downward by N lines.
90Stop if the top edge of the image is reached."
91 (interactive "p")
92 (image-next-line (- n)))
93
94(defun image-scroll-up (&optional n)
95 "Scroll image in current window upward by N lines.
96Stop if the bottom edge of the image is reached.
97If ARG is omitted or nil, scroll upward by a near full screen.
98A near full screen is `next-screen-context-lines' less than a full screen.
99Negative ARG means scroll downward.
100If ARG is the atom `-', scroll downward by nearly full screen.
101When calling from a program, supply as argument a number, nil, or `-'."
102 (interactive "P")
103 (cond ((null n)
104 (let* ((edges (window-inside-edges))
105 (win-height (- (nth 3 edges) (nth 1 edges))))
106 (image-next-line
107 (max 0 (- win-height next-screen-context-lines)))))
108 ((eq n '-)
109 (let* ((edges (window-inside-edges))
110 (win-height (- (nth 3 edges) (nth 1 edges))))
111 (image-next-line
112 (min 0 (- next-screen-context-lines win-height)))))
113 (t (image-next-line (prefix-numeric-value n)))))
114
115(defun image-scroll-down (&optional n)
116 "Scroll image in current window downward by N lines
117Stop if the top edge of the image is reached.
118If ARG is omitted or nil, scroll downward by a near full screen.
119A near full screen is `next-screen-context-lines' less than a full screen.
120Negative ARG means scroll upward.
121If ARG is the atom `-', scroll upward by nearly full screen.
122When calling from a program, supply as argument a number, nil, or `-'."
123 (interactive "P")
124 (cond ((null n)
125 (let* ((edges (window-inside-edges))
126 (win-height (- (nth 3 edges) (nth 1 edges))))
127 (image-next-line
128 (min 0 (- next-screen-context-lines win-height)))))
129 ((eq n '-)
130 (let* ((edges (window-inside-edges))
131 (win-height (- (nth 3 edges) (nth 1 edges))))
132 (image-next-line
133 (max 0 (- win-height next-screen-context-lines)))))
134 (t (image-next-line (- (prefix-numeric-value n))))))
135
136(defun image-bol (arg)
137 "Scroll horizontally to the left edge of the image in the current window.
138With argument ARG not nil or 1, move forward ARG - 1 lines first,
139stopping if the top or bottom edge of the image is reached."
140 (interactive "p")
141 (and arg
142 (/= (setq arg (prefix-numeric-value arg)) 1)
143 (image-next-line (- arg 1)))
144 (set-window-hscroll (selected-window) 0))
145
146(defun image-eol (arg)
147 "Scroll horizontally to the right edge of the image in the current window.
148With argument ARG not nil or 1, move forward ARG - 1 lines first,
149stopping if the top or bottom edge of the image is reached."
150 (interactive "p")
151 (and arg
152 (/= (setq arg (prefix-numeric-value arg)) 1)
153 (image-next-line (- arg 1)))
154 (let* ((image (get-text-property 1 'display))
155 (edges (window-inside-edges))
156 (win-width (- (nth 2 edges) (nth 0 edges)))
157 (img-width (ceiling (car (image-size image)))))
158 (set-window-hscroll (selected-window)
159 (max 0 (- img-width win-width)))))
160
161(defun image-bob ()
162 "Scroll to the top-left corner of the image in the current window."
163 (interactive)
164 (set-window-hscroll (selected-window) 0)
165 (set-window-vscroll (selected-window) 0))
166
167(defun image-eob ()
168 "Scroll to the bottom-right corner of the image in the current window."
169 (interactive)
170 (let* ((image (get-text-property 1 'display))
171 (edges (window-inside-edges))
172 (win-width (- (nth 2 edges) (nth 0 edges)))
173 (img-width (ceiling (car (image-size image))))
174 (win-height (- (nth 3 edges) (nth 1 edges)))
175 (img-height (ceiling (cdr (image-size image)))))
176 (set-window-hscroll (selected-window) (max 0 (- img-width win-width)))
177 (set-window-vscroll (selected-window) (max 0 (- img-height win-height)))))
178
179;;; Image Mode setup
180
46(defvar image-mode-map 181(defvar image-mode-map
47 (let ((map (make-sparse-keymap))) 182 (let ((map (make-sparse-keymap)))
48 (define-key map "\C-c\C-c" 'image-toggle-display) 183 (define-key map "\C-c\C-c" 'image-toggle-display)
184 (define-key map [remap forward-char] 'image-forward-hscroll)
185 (define-key map [remap backward-char] 'image-backward-hscroll)
186 (define-key map [remap previous-line] 'image-previous-line)
187 (define-key map [remap next-line] 'image-next-line)
188 (define-key map [remap scroll-up] 'image-scroll-up)
189 (define-key map [remap scroll-down] 'image-scroll-down)
190 (define-key map [remap move-beginning-of-line] 'image-bol)
191 (define-key map [remap move-end-of-line] 'image-eol)
192 (define-key map [remap beginning-of-buffer] 'image-bob)
193 (define-key map [remap end-of-buffer] 'image-eob)
194 map)
195 "Major mode keymap for viewing images in Image mode.")
196
197(defvar image-mode-text-map
198 (let ((map (make-sparse-keymap)))
199 (define-key map "\C-c\C-c" 'image-toggle-display)
49 map) 200 map)
50 "Major mode keymap for Image mode.") 201 "Major mode keymap for viewing images as text in Image mode.")
51 202
52;;;###autoload 203;;;###autoload
53(defun image-mode () 204(defun image-mode ()
@@ -58,13 +209,13 @@ to toggle between display as an image and display as text."
58 (kill-all-local-variables) 209 (kill-all-local-variables)
59 (setq mode-name "Image") 210 (setq mode-name "Image")
60 (setq major-mode 'image-mode) 211 (setq major-mode 'image-mode)
61 (use-local-map image-mode-map)
62 (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) 212 (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
63 (if (and (display-images-p) 213 (if (and (display-images-p)
64 (not (get-text-property (point-min) 'display))) 214 (not (get-text-property (point-min) 'display)))
65 (image-toggle-display) 215 (image-toggle-display)
66 ;; Set next vars when image is already displayed but local 216 ;; Set next vars when image is already displayed but local
67 ;; variables were cleared by kill-all-local-variables 217 ;; variables were cleared by kill-all-local-variables
218 (use-local-map image-mode-map)
68 (setq cursor-type nil truncate-lines t)) 219 (setq cursor-type nil truncate-lines t))
69 (run-mode-hooks 'image-mode-hook) 220 (run-mode-hooks 'image-mode-hook)
70 (if (display-images-p) 221 (if (display-images-p)
@@ -140,6 +291,8 @@ and showing the image as an image."
140 (set-buffer-modified-p modified) 291 (set-buffer-modified-p modified)
141 (kill-local-variable 'cursor-type) 292 (kill-local-variable 'cursor-type)
142 (kill-local-variable 'truncate-lines) 293 (kill-local-variable 'truncate-lines)
294 (kill-local-variable 'auto-hscroll-mode)
295 (use-local-map image-mode-text-map)
143 (if (called-interactively-p) 296 (if (called-interactively-p)
144 (message "Repeat this command to go back to displaying the image"))) 297 (message "Repeat this command to go back to displaying the image")))
145 ;; Turn the image data into a real image, but only if the whole file 298 ;; Turn the image data into a real image, but only if the whole file
@@ -161,12 +314,9 @@ and showing the image as an image."
161 nil t))) 314 nil t)))
162 (props 315 (props
163 `(display ,image 316 `(display ,image
164 intangible ,image 317 intangible ,image
165 rear-nonsticky (display intangible) 318 rear-nonsticky (display intangible)
166 ;; This a cheap attempt to make the whole buffer 319 read-only t front-sticky (read-only)))
167 ;; read-only when we're visiting the file (as
168 ;; opposed to just inserting it).
169 read-only t front-sticky (read-only)))
170 (inhibit-read-only t) 320 (inhibit-read-only t)
171 (buffer-undo-list t) 321 (buffer-undo-list t)
172 (modified (buffer-modified-p))) 322 (modified (buffer-modified-p)))
@@ -179,6 +329,9 @@ and showing the image as an image."
179 ;; This just makes the arrow displayed in the right fringe 329 ;; This just makes the arrow displayed in the right fringe
180 ;; area look correct when the image is wider than the window. 330 ;; area look correct when the image is wider than the window.
181 (setq truncate-lines t) 331 (setq truncate-lines t)
332 ;; Allow navigation of large images
333 (set (make-local-variable 'auto-hscroll-mode) nil)
334 (use-local-map image-mode-map)
182 (if (called-interactively-p) 335 (if (called-interactively-p)
183 (message "Repeat this command to go back to displaying the file as text"))))) 336 (message "Repeat this command to go back to displaying the file as text")))))
184 337
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index a509fdf7f6c..e02fec1362f 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -2025,6 +2025,7 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
2025 (error "Pop-up menus do not work on this terminal")) 2025 (error "Pop-up menus do not work on this terminal"))
2026 ;; use the correct dictionary 2026 ;; use the correct dictionary
2027 (flyspell-accept-buffer-local-defs) 2027 (flyspell-accept-buffer-local-defs)
2028 (or opoint (setq opoint (point-marker)))
2028 (let ((cursor-location (point)) 2029 (let ((cursor-location (point))
2029 (word (flyspell-get-word nil))) 2030 (word (flyspell-get-word nil)))
2030 (if (consp word) 2031 (if (consp word)
@@ -2133,6 +2134,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
2133;;*---------------------------------------------------------------------*/ 2134;;*---------------------------------------------------------------------*/
2134(defun flyspell-emacs-popup (event poss word) 2135(defun flyspell-emacs-popup (event poss word)
2135 "The Emacs popup menu." 2136 "The Emacs popup menu."
2137 (unless window-system
2138 (error "This command requires pop-up dialogs"))
2136 (if (not event) 2139 (if (not event)
2137 (let* ((mouse-pos (mouse-position)) 2140 (let* ((mouse-pos (mouse-position))
2138 (mouse-pos (if (nth 1 mouse-pos) 2141 (mouse-pos (if (nth 1 mouse-pos)
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 1bde704790b..22935ab7f3b 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -325,7 +325,7 @@ If WITNESS if not found, return nil, otherwise return the root."
325 ;; to another user. This should save us from looking in 325 ;; to another user. This should save us from looking in
326 ;; things like /net and /afs. This assumes that all the 326 ;; things like /net and /afs. This assumes that all the
327 ;; files inside a project belong to the same user. 327 ;; files inside a project belong to the same user.
328 (not (equal user (file-attributes file))) 328 (not (equal user (nth 2 (file-attributes file))))
329 (string-match vc-ignore-dir-regexp file))) 329 (string-match vc-ignore-dir-regexp file)))
330 (if (file-exists-p (expand-file-name witness file)) 330 (if (file-exists-p (expand-file-name witness file))
331 (setq root file) 331 (setq root file)
diff --git a/mkinstalldirs b/mkinstalldirs
index 9e4b309b364..be98de6be01 100755
--- a/mkinstalldirs
+++ b/mkinstalldirs
@@ -1,38 +1,152 @@
1#! /bin/sh 1#! /bin/sh
2# mkinstalldirs --- make directory hierarchy 2# mkinstalldirs --- make directory hierarchy
3# Author: Noah Friedman <friedman@prep.ai.mit.edu> 3
4scriptversion=2006-05-11.19
5
6# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
4# Created: 1993-05-16 7# Created: 1993-05-16
5# Public domain 8# Public domain.
9#
10# This file is maintained in Automake, please report
11# bugs to <bug-automake@gnu.org> or send patches to
12# <automake-patches@gnu.org>.
6 13
14nl='
15'
16IFS=" "" $nl"
7errstatus=0 17errstatus=0
18dirmode=
19
20usage="\
21Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
22
23Create each directory DIR (with mode MODE, if specified), including all
24leading file name components.
25
26Report bugs to <bug-automake@gnu.org>."
27
28# process command line arguments
29while test $# -gt 0 ; do
30 case $1 in
31 -h | --help | --h*) # -h for help
32 echo "$usage"
33 exit $?
34 ;;
35 -m) # -m PERM arg
36 shift
37 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
38 dirmode=$1
39 shift
40 ;;
41 --version)
42 echo "$0 $scriptversion"
43 exit $?
44 ;;
45 --) # stop option processing
46 shift
47 break
48 ;;
49 -*) # unknown option
50 echo "$usage" 1>&2
51 exit 1
52 ;;
53 *) # first non-opt arg
54 break
55 ;;
56 esac
57done
58
59for file
60do
61 if test -d "$file"; then
62 shift
63 else
64 break
65 fi
66done
67
68case $# in
69 0) exit 0 ;;
70esac
71
72# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
73# mkdir -p a/c at the same time, both will detect that a is missing,
74# one will create a, then the other will try to create a and die with
75# a "File exists" error. This is a problem when calling mkinstalldirs
76# from a parallel make. We use --version in the probe to restrict
77# ourselves to GNU mkdir, which is thread-safe.
78case $dirmode in
79 '')
80 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
81 echo "mkdir -p -- $*"
82 exec mkdir -p -- "$@"
83 else
84 # On NextStep and OpenStep, the `mkdir' command does not
85 # recognize any option. It will interpret all options as
86 # directories to create, and then abort because `.' already
87 # exists.
88 test -d ./-p && rmdir ./-p
89 test -d ./--version && rmdir ./--version
90 fi
91 ;;
92 *)
93 if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
94 test ! -d ./--version; then
95 echo "mkdir -m $dirmode -p -- $*"
96 exec mkdir -m "$dirmode" -p -- "$@"
97 else
98 # Clean up after NextStep and OpenStep mkdir.
99 for d in ./-m ./-p ./--version "./$dirmode";
100 do
101 test -d $d && rmdir $d
102 done
103 fi
104 ;;
105esac
8 106
9for file 107for file
10do 108do
11 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 109 case $file in
12 shift 110 /*) pathcomp=/ ;;
111 *) pathcomp= ;;
112 esac
113 oIFS=$IFS
114 IFS=/
115 set fnord $file
116 shift
117 IFS=$oIFS
118
119 for d
120 do
121 test "x$d" = x && continue
13 122
14 pathcomp= 123 pathcomp=$pathcomp$d
15 for d 124 case $pathcomp in
16 do 125 -*) pathcomp=./$pathcomp ;;
17 pathcomp="$pathcomp$d" 126 esac
18 case "$pathcomp" in
19 -* ) pathcomp=./$pathcomp ;;
20 esac
21 127
22 if test ! -d "$pathcomp"; then 128 if test ! -d "$pathcomp"; then
23 echo "mkdir $pathcomp" 1>&2 129 echo "mkdir $pathcomp"
24 130
25 (mkdir "$pathcomp" && chmod a+rx "$pathcomp") || lasterr=$? 131 mkdir "$pathcomp" || lasterr=$?
26 132
27 if test ! -d "$pathcomp"; then 133 if test ! -d "$pathcomp"; then
28 errstatus=$lasterr 134 errstatus=$lasterr
29 fi 135 else
30 fi 136 if test ! -z "$dirmode"; then
137 echo "chmod $dirmode $pathcomp"
138 lasterr=
139 chmod "$dirmode" "$pathcomp" || lasterr=$?
31 140
32 pathcomp="$pathcomp/" 141 if test ! -z "$lasterr"; then
33 done 142 errstatus=$lasterr
143 fi
144 fi
145 fi
146 fi
147
148 pathcomp=$pathcomp/
149 done
34done 150done
35 151
36exit $errstatus 152exit $errstatus
37
38# mkinstalldirs ends here
diff --git a/src/ChangeLog b/src/ChangeLog
index 54970e7ecf3..bafb3991d2e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -3,6 +3,10 @@
3 * macterm.c [USE_CARBON_EVENTS] (mac_handle_window_event): 3 * macterm.c [USE_CARBON_EVENTS] (mac_handle_window_event):
4 Call mac_wakeup_from_rne on window size change. 4 Call mac_wakeup_from_rne on window size change.
5 5
62007-05-25 Chong Yidong <cyd@stupidchicken.com>
7
8 * image.c (uncache_image): Fix typo.
9
62007-05-23 Johannes Weiner <hannes@saeurebad.de> (tiny change) 102007-05-23 Johannes Weiner <hannes@saeurebad.de> (tiny change)
7 11
8 * keyboard.c (make_lispy_movement): Condition on HAVE_GPM too. 12 * keyboard.c (make_lispy_movement): Condition on HAVE_GPM too.
diff --git a/src/image.c b/src/image.c
index 6858675d9e4..11f4425136c 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1639,7 +1639,7 @@ uncache_image (f, spec)
1639 Lisp_Object spec; 1639 Lisp_Object spec;
1640{ 1640{
1641 struct image_cache *c = FRAME_X_IMAGE_CACHE (f); 1641 struct image_cache *c = FRAME_X_IMAGE_CACHE (f);
1642 struct image *img = IMAGE_FROM_ID (f, lookup_image (f, spec)); 1642 struct image *img;
1643 unsigned hash = sxhash (spec, 0); 1643 unsigned hash = sxhash (spec, 0);
1644 int i = hash % IMAGE_CACHE_BUCKETS_SIZE; 1644 int i = hash % IMAGE_CACHE_BUCKETS_SIZE;
1645 1645