Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103030. ------------------------------------------------------------ revno: 103030 author: Lars Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-01-30 03:00:34 +0000 message: nnmail.el (nnmail-article-group): A better test for fanciness. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-01-30 02:51:45 +0000 +++ lisp/gnus/ChangeLog 2011-01-30 03:00:34 +0000 @@ -2,6 +2,7 @@ * nnmail.el (nnmail-article-group): Check for a direct fancy split method. + (nnmail-article-group): A better test for fanciness. * nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID. === modified file 'lisp/gnus/nnmail.el' --- lisp/gnus/nnmail.el 2011-01-30 02:51:45 +0000 +++ lisp/gnus/nnmail.el 2011-01-30 03:00:34 +0000 @@ -1148,8 +1148,7 @@ (setq nnmail-split-trace nil)) (if (or (and (symbolp nnmail-split-methods) (fboundp nnmail-split-methods)) - (memq (car-safe nnmail-split-methods) - '(| &)) + (not (consp (car-safe nnmail-split-methods))) (and (listp nnmail-split-methods) ;; Not a regular split method, so it has to be a ;; fancy one. ------------------------------------------------------------ revno: 103029 author: Lars Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-01-30 02:51:45 +0000 message: nnmail.el (nnmail-article-group): Check for a direct fancy split method. gnus.texi (Client-Side IMAP Splitting): Add a complete nnimap fancy splitting example. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-01-29 14:48:19 +0000 +++ doc/misc/ChangeLog 2011-01-30 02:51:45 +0000 @@ -1,3 +1,8 @@ +2011-01-30 Lars Ingebrigtsen + + * gnus.texi (Client-Side IMAP Splitting): Add a complete nnimap fancy + splitting example. + 2011-01-29 Eli Zaretskii * makefile.w32-in (MAKEINFO): Remove options, leave only program name. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2011-01-28 01:41:15 +0000 +++ doc/misc/gnus.texi 2011-01-30 02:51:45 +0000 @@ -14244,6 +14244,18 @@ @end table +Here's a complete example @code{nnimap} backend with a client-side +``fancy'' splitting method: + +@example +(nnimap "imap.example.com" + (nnimap-inbox "INBOX") + (nnimap-split-methods + (| ("MailScanner-SpamCheck" "spam" "spam.detected") + (to "foo@@bar.com" "foo") + "undecided"))) +@end example + @node Getting Mail @section Getting Mail === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-01-30 01:46:32 +0000 +++ lisp/gnus/ChangeLog 2011-01-30 02:51:45 +0000 @@ -1,5 +1,8 @@ 2011-01-30 Lars Ingebrigtsen + * nnmail.el (nnmail-article-group): Check for a direct fancy split + method. + * nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID. === modified file 'lisp/gnus/nnmail.el' --- lisp/gnus/nnmail.el 2011-01-26 08:36:39 +0000 +++ lisp/gnus/nnmail.el 2011-01-30 02:51:45 +0000 @@ -1148,6 +1148,8 @@ (setq nnmail-split-trace nil)) (if (or (and (symbolp nnmail-split-methods) (fboundp nnmail-split-methods)) + (memq (car-safe nnmail-split-methods) + '(| &)) (and (listp nnmail-split-methods) ;; Not a regular split method, so it has to be a ;; fancy one. ------------------------------------------------------------ revno: 103028 author: Lars Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Sun 2011-01-30 01:46:32 +0000 message: nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-01-29 02:29:38 +0000 +++ lisp/gnus/ChangeLog 2011-01-30 01:46:32 +0000 @@ -1,3 +1,8 @@ +2011-01-30 Lars Ingebrigtsen + + * nnimap.el (nnimap-request-head): Protect against not finding the + article by Message-ID. + 2011-01-29 Lars Ingebrigtsen * gnus-art.el (article-update-date-lapsed): Try a better way to really === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-01-25 23:51:40 +0000 +++ lisp/gnus/nnimap.el 2011-01-30 01:46:32 +0000 @@ -519,15 +519,17 @@ (with-current-buffer (nnimap-buffer) (when (stringp article) (setq article (nnimap-find-article-by-message-id group article))) - (nnimap-get-whole-article - article (format "UID FETCH %%d %s" - (nnimap-header-parameters))) - (let ((buffer (current-buffer))) - (with-current-buffer (or to-buffer nntp-server-buffer) - (erase-buffer) - (insert-buffer-substring buffer) - (nnheader-ms-strip-cr) - (cons group article)))))) + (if (null article) + nil + (nnimap-get-whole-article + article (format "UID FETCH %%d %s" + (nnimap-header-parameters))) + (let ((buffer (current-buffer))) + (with-current-buffer (or to-buffer nntp-server-buffer) + (erase-buffer) + (insert-buffer-substring buffer) + (nnheader-ms-strip-cr) + (cons group article))))))) (defun nnimap-get-whole-article (article &optional command) (let ((result ------------------------------------------------------------ revno: 103027 committer: Andreas Schwab branch nick: emacs timestamp: Sun 2011-01-30 01:35:35 +0100 message: * src/font.c (PROP_MATCH): Remove parameter N and use strlen instead. All uses changed. (PROP_SAVE): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-01-29 15:17:00 +0000 +++ src/ChangeLog 2011-01-30 00:35:35 +0000 @@ -1,3 +1,9 @@ +2011-01-30 Andreas Schwab + + * font.c (PROP_MATCH): Remove parameter N and use strlen instead. + All uses changed. + (PROP_SAVE): Likewise. + 2011-01-29 Chong Yidong * keyboard.c (make_lispy_position): Fix typo in last change === modified file 'src/font.c' --- src/font.c 2011-01-27 23:45:04 +0000 +++ src/font.c 2011-01-30 00:35:35 +0000 @@ -1380,25 +1380,26 @@ word_len = q - p; val = font_intern_prop (p, q - p, 1); -#define PROP_MATCH(STR,N) ((word_len == N) && memcmp (p, STR, N) == 0) +#define PROP_MATCH(STR) (word_len == strlen (STR) \ + && memcmp (p, STR, strlen (STR)) == 0) - if (PROP_MATCH ("light", 5) - || PROP_MATCH ("medium", 6) - || PROP_MATCH ("demibold", 8) - || PROP_MATCH ("bold", 4) - || PROP_MATCH ("black", 5)) + if (PROP_MATCH ("light") + || PROP_MATCH ("medium") + || PROP_MATCH ("demibold") + || PROP_MATCH ("bold") + || PROP_MATCH ("black")) FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, val); - else if (PROP_MATCH ("roman", 5) - || PROP_MATCH ("italic", 6) - || PROP_MATCH ("oblique", 7)) + else if (PROP_MATCH ("roman") + || PROP_MATCH ("italic") + || PROP_MATCH ("oblique")) FONT_SET_STYLE (font, FONT_SLANT_INDEX, val); - else if (PROP_MATCH ("charcell", 8)) + else if (PROP_MATCH ("charcell")) ASET (font, FONT_SPACING_INDEX, make_number (FONT_SPACING_CHARCELL)); - else if (PROP_MATCH ("mono", 4)) + else if (PROP_MATCH ("mono")) ASET (font, FONT_SPACING_INDEX, make_number (FONT_SPACING_MONO)); - else if (PROP_MATCH ("proportional", 12)) + else if (PROP_MATCH ("proportional")) ASET (font, FONT_SPACING_INDEX, make_number (FONT_SPACING_PROPORTIONAL)); #undef PROP_MATCH @@ -1480,31 +1481,32 @@ word_start = q + 1; word_len = p - word_start; -#define PROP_MATCH(STR,N) \ - ((word_len == N) && memcmp (word_start, STR, N) == 0) -#define PROP_SAVE(VAR,STR,N) \ - (VAR = NILP (VAR) ? font_intern_prop (STR, N, 1) : VAR) +#define PROP_MATCH(STR) \ + (word_len == strlen (STR) \ + && memcmp (word_start, STR, strlen (STR)) == 0) +#define PROP_SAVE(VAR, STR) \ + (VAR = NILP (VAR) ? font_intern_prop (STR, strlen (STR), 1) : VAR) - if (PROP_MATCH ("Ultra-Light", 11)) - PROP_SAVE (weight, "ultra-light", 11); - else if (PROP_MATCH ("Light", 5)) - PROP_SAVE (weight, "light", 5); - else if (PROP_MATCH ("Book", 4)) - PROP_SAVE (weight, "book", 4); - else if (PROP_MATCH ("Medium", 6)) - PROP_SAVE (weight, "medium", 6); - else if (PROP_MATCH ("Semi-Bold", 9)) - PROP_SAVE (weight, "semi-bold", 9); - else if (PROP_MATCH ("Bold", 4)) - PROP_SAVE (weight, "bold", 4); - else if (PROP_MATCH ("Italic", 6)) - PROP_SAVE (slant, "italic", 6); - else if (PROP_MATCH ("Oblique", 7)) - PROP_SAVE (slant, "oblique", 7); - else if (PROP_MATCH ("Semi-Condensed", 14)) - PROP_SAVE (width, "semi-condensed", 14); - else if (PROP_MATCH ("Condensed", 9)) - PROP_SAVE (width, "condensed", 9); + if (PROP_MATCH ("Ultra-Light")) + PROP_SAVE (weight, "ultra-light"); + else if (PROP_MATCH ("Light")) + PROP_SAVE (weight, "light"); + else if (PROP_MATCH ("Book")) + PROP_SAVE (weight, "book"); + else if (PROP_MATCH ("Medium")) + PROP_SAVE (weight, "medium"); + else if (PROP_MATCH ("Semi-Bold")) + PROP_SAVE (weight, "semi-bold"); + else if (PROP_MATCH ("Bold")) + PROP_SAVE (weight, "bold"); + else if (PROP_MATCH ("Italic")) + PROP_SAVE (slant, "italic"); + else if (PROP_MATCH ("Oblique")) + PROP_SAVE (slant, "oblique"); + else if (PROP_MATCH ("Semi-Condensed")) + PROP_SAVE (width, "semi-condensed"); + else if (PROP_MATCH ("Condensed")) + PROP_SAVE (width, "condensed"); /* An unknown word must be part of the font name. */ else { ------------------------------------------------------------ revno: 103026 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-01-29 16:19:21 -0500 message: Refresh Dired and VC-dir buffers after vc-pull and vc-merge. * vc/vc-dispatcher.el (vc-set-async-update): New function for updating Dired or VC-dir buffers after async command completes. * vc/vc-bzr.el (vc-bzr-async-command): Return the process buffer. (vc-bzr-pull, vc-bzr-merge-branch): Use vc-set-async-update. * vc/vc-git.el (vc-git-merge-branch): Add FETCH_HEAD to branch completions if it exists. Use vc-set-async-update. (vc-git-pull): Use vc-set-async-update. * vc/vc-hg.el (vc-hg-pull): Fix default-contents arg to read-shell-command. Use vc-set-async-update. (vc-hg-merge-branch): Use vc-set-async-update. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-29 11:05:35 +0000 +++ lisp/ChangeLog 2011-01-29 21:19:21 +0000 @@ -1,3 +1,19 @@ +2011-01-29 Chong Yidong + + * vc/vc-dispatcher.el (vc-set-async-update): New function for + updating Dired or VC-dir buffers after async command completes. + + * vc/vc-bzr.el (vc-bzr-async-command): Return the process buffer. + (vc-bzr-pull, vc-bzr-merge-branch): Use vc-set-async-update. + + * vc/vc-git.el (vc-git-merge-branch): Add FETCH_HEAD to branch + completions if it exists. Use vc-set-async-update. + (vc-git-pull): Use vc-set-async-update. + + * vc/vc-hg.el (vc-hg-pull): Fix default-contents arg to + read-shell-command. Use vc-set-async-update. + (vc-hg-merge-branch): Use vc-set-async-update. + 2011-01-29 Daiki Ueno * epg.el (epg--status-KEYEXPIRED, epg--status-KEYREVOKED): Don't === modified file 'lisp/vc/vc-bzr.el' --- lisp/vc/vc-bzr.el 2011-01-28 23:10:55 +0000 +++ lisp/vc/vc-bzr.el 2011-01-29 21:19:21 +0000 @@ -100,14 +100,15 @@ `LC_MESSAGES=C' to the environment. Use the current Bzr root directory as the ROOT argument to `vc-do-async-command', and specify an output buffer named -\"*vc-bzr : ROOT*\"." +\"*vc-bzr : ROOT*\". Return this buffer." (let* ((process-environment (list* "BZR_PROGRESS_BAR=none" "LC_MESSAGES=C" process-environment)) (root (vc-bzr-root default-directory)) (buffer (format "*vc-bzr : %s*" (expand-file-name root)))) (apply 'vc-do-async-command buffer root - vc-bzr-program bzr-command args))) + vc-bzr-program bzr-command args) + buffer)) ;;;###autoload (defconst vc-bzr-admin-dirname ".bzr" @@ -297,14 +298,15 @@ (when (or prompt (not (or bound parent))) (setq args (split-string (read-shell-command - "Run Bzr (like this): " + "Bzr pull command: " (concat vc-bzr-program " " command) 'vc-bzr-history) " " t)) (setq vc-bzr-program (car args) command (cadr args) args (cddr args))) - (apply 'vc-bzr-async-command command args))) + (vc-set-async-update + (apply 'vc-bzr-async-command command args)))) (defun vc-bzr-merge-branch () "Merge another Bzr branch into the current one. @@ -328,7 +330,7 @@ (cmd (split-string (read-shell-command - "Run Bzr (like this): " + "Bzr merge command: " (concat vc-bzr-program " merge --pull" (if location (concat " " location) "")) 'vc-bzr-history) @@ -336,7 +338,8 @@ (vc-bzr-program (car cmd)) (command (cadr cmd)) (args (cddr cmd))) - (apply 'vc-bzr-async-command command args))) + (vc-set-async-update + (apply 'vc-bzr-async-command command args)))) (defun vc-bzr-status (file) "Return FILE status according to Bzr. === modified file 'lisp/vc/vc-dispatcher.el' --- lisp/vc/vc-dispatcher.el 2011-01-29 03:12:32 +0000 +++ lisp/vc/vc-dispatcher.el 2011-01-29 21:19:21 +0000 @@ -382,7 +382,33 @@ (apply 'vc-do-command t 'async command nil args))) (setq window (display-buffer buffer)) (if window - (set-window-start window new-window-start)))) + (set-window-start window new-window-start)) + buffer)) + +(defun vc-set-async-update (process-buffer) + "Set a `vc-exec-after' action appropriate to the current buffer. +This action will update the current buffer after the current +asynchronous VC command has completed. PROCESS-BUFFER is the +buffer for the asynchronous VC process. + +If the current buffer is a VC Dir buffer, call `vc-dir-refresh'. +If the current buffer is a Dired buffer, revert it." + (let* ((buf (current-buffer)) + (tick (buffer-modified-tick buf))) + (cond + ((derived-mode-p 'vc-dir-mode) + (with-current-buffer process-buffer + (vc-exec-after + `(if (buffer-live-p ,buf) + (with-current-buffer ,buf + (vc-dir-refresh)))))) + ((derived-mode-p 'dired-mode) + (with-current-buffer process-buffer + (vc-exec-after + `(and (buffer-live-p ,buf) + (= (buffer-modified-tick ,buf) ,tick) + (with-current-buffer ,buf + (revert-buffer))))))))) ;; These functions are used to ensure that the view the user sees is up to date ;; even if the dispatcher client mode has messed with file contents (as in, === modified file 'lisp/vc/vc-git.el' --- lisp/vc/vc-git.el 2011-01-29 03:12:32 +0000 +++ lisp/vc/vc-git.el 2011-01-29 21:19:21 +0000 @@ -607,9 +607,8 @@ (defun vc-git-pull (prompt) "Pull changes into the current Git branch. -Normally, this runs \"git pull\".If there is no default -location from which to pull or update, or if PROMPT is non-nil, -prompt for the Git command to run." +Normally, this runs \"git pull\". If PROMPT is non-nil, prompt +for the Git command to run." (let* ((root (vc-git-root default-directory)) (buffer (format "*vc-git : %s*" (expand-file-name root))) (command "pull") @@ -618,14 +617,15 @@ ;; If necessary, prompt for the exact command. (when prompt (setq args (split-string - (read-shell-command "Run Git (like this): " + (read-shell-command "Git pull command: " "git pull" 'vc-git-history) " " t)) (setq git-program (car args) command (cadr args) args (cddr args))) - (apply 'vc-do-async-command buffer root git-program command args))) + (apply 'vc-do-async-command buffer root git-program command args) + (vc-set-async-update buffer))) (defun vc-git-merge-branch () "Merge changes into the current Git branch. @@ -634,9 +634,17 @@ (buffer (format "*vc-git : %s*" (expand-file-name root))) (branches (cdr (vc-git-branches))) (merge-source - (completing-read "Merge from branch: " branches nil t))) + (completing-read "Merge from branch: " + (if (or (member "FETCH_HEAD" branches) + (not (file-readable-p + (expand-file-name ".git/FETCH_HEAD" + root)))) + branches + (cons "FETCH_HEAD" branches)) + nil t))) (apply 'vc-do-async-command buffer root "git" "merge" - (list merge-source)))) + (list merge-source)) + (vc-set-async-update buffer))) ;;; HISTORY FUNCTIONS === modified file 'lisp/vc/vc-hg.el' --- lisp/vc/vc-hg.el 2011-01-29 03:12:32 +0000 +++ lisp/vc/vc-hg.el 2011-01-29 21:19:21 +0000 @@ -610,8 +610,18 @@ (error "No log entries selected for push")))) (defun vc-hg-pull (prompt) + "Issue a Mercurial pull command. +If called interactively with a set of marked Log View buffers, +call \"hg pull -r REVS\" to pull in the specified revisions REVS. + +With a prefix argument or if PROMPT is non-nil, prompt for a +specific Mercurial pull command. The default is \"hg pull -u\", +which fetches changesets from the default remote repository and +then attempts to update the working directory." (interactive "P") (let (marked-list) + ;; The `vc-hg-pull' command existed before the `pull' VC action + ;; was implemented. Keep it for backward compatibility. (if (and (called-interactively-p 'interactive) (setq marked-list (log-view-get-marked))) (apply #'vc-hg-command @@ -624,26 +634,29 @@ (buffer (format "*vc-hg : %s*" (expand-file-name root))) (command "pull") (hg-program "hg") - ;; Todo: maybe check if we're up-to-date before updating - ;; the working copy to the latest state. + ;; Fixme: before updating the working copy to the latest + ;; state, should check if it's visiting an old revision. (args '("-u"))) ;; If necessary, prompt for the exact command. (when prompt (setq args (split-string - (read-shell-command "Run Hg (like this): " "hg -u" + (read-shell-command "Run Hg (like this): " "hg pull -u" 'vc-hg-history) " " t)) (setq hg-program (car args) command (cadr args) args (cddr args))) (apply 'vc-do-async-command buffer root hg-program - command args))))) + command args) + (vc-set-async-update buffer))))) (defun vc-hg-merge-branch () - "Merge incoming changes into the current Mercurial working directory." + "Merge incoming changes into the current working directory. +This runs the command \"hg merge\"." (let* ((root (vc-hg-root default-directory)) (buffer (format "*vc-hg : %s*" (expand-file-name root)))) - (apply 'vc-do-async-command buffer root "hg" '("merge")))) + (apply 'vc-do-async-command buffer root "hg" '("merge")) + (vc-set-async-update buffer))) ;;; Internal functions ------------------------------------------------------------ revno: 103025 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-01-29 10:17:00 -0500 message: * keyboard.c (make_lispy_position): Fix typo in last change (Bug#7935). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-01-29 12:36:11 +0000 +++ src/ChangeLog 2011-01-29 15:17:00 +0000 @@ -1,3 +1,8 @@ +2011-01-29 Chong Yidong + + * keyboard.c (make_lispy_position): Fix typo in last change + (Bug#7935). + 2011-01-29 Eli Zaretskii * s/ms-w32.h (HAVE_MKTIME): Remove. === modified file 'src/keyboard.c' --- src/keyboard.c 2011-01-28 20:30:38 +0000 +++ src/keyboard.c 2011-01-29 15:17:00 +0000 @@ -5155,7 +5155,7 @@ is the X coordinate relative to the text area for text-area and right-margin clicks, zero otherwise. */ int x2 - = (part == ON_TEXT) ? x2 + = (part == ON_TEXT) ? xret : (part == ON_RIGHT_FRINGE || part == ON_RIGHT_MARGIN) ? (XINT (x) - window_box_left (w, TEXT_AREA)) : 0; ------------------------------------------------------------ revno: 103024 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-01-29 16:48:19 +0200 message: Fix doc/*/makefile.w32-in according to r102953-r102956. doc/lispref/makefile.w32-in (texinfodir): New variable. (usermanualdir): Remove as redundant with $(emacsdir). (MAKEINFO): Remove options, leave only program name. (MAKEINFO_OPTS): New variable. (texinputdir, $(infodir)/elisp): Use $(MAKEINFO_OPTS). doc/emacs/makefile.w32-in (MAKEINFO): Remove options, leave only program name. (MAKEINFO_OPTS): New variable. (ENVADD, $(infodir)/emacs): Use $(MAKEINFO_OPTS). (emacs.html): New target. (clean): Remove emacs.html. doc/misc/makefile.w32-in (MAKEINFO): Remove options, leave only program name. (MAKEINFO_OPTS): New variable. (ENVADD, $(infodir)/emacs): Use $(MAKEINFO_OPTS). ($(infodir)/info, $(infodir)/ccmode, $(infodir)/ada-mode) ($(infodir)/pcl-cvs, $(infodir)/eshell, $(infodir)/cl) ($(infodir)/dbus, $(infodir)/dired-x, $(infodir)/ediff) ($(infodir)/flymake, $(infodir)/forms, $(infodir)/gnus) ($(infodir)/message, $(infodir)/emacs-mime, $(infodir)/sieve) ($(infodir)/pgg, $(infodir)/mh-e, $(infodir)/reftex) ($(infodir)/remember, $(infodir)/sasl, $(infodir)/sc) ($(infodir)/vip, $(infodir)/viper, $(infodir)/widget) ($(infodir)/efaq, $(infodir)/autotype, $(infodir)/calc) ($(infodir)/idlwave, $(infodir)/eudc, $(infodir)/ebrowse) ($(infodir)/woman, $(infodir)/speedbar, $(infodir)/tramp) ($(infodir)/ses, $(infodir)/smtpmail, $(infodir)/org) ($(infodir)/url, $(infodir)/newsticker, $(infodir)/nxml-mode) ($(infodir)/rcirc, $(infodir)/erc, $(infodir)/ert) ($(infodir)/epa, $(infodir)/mairix-el, $(infodir)/auth) ($(infodir)/eieio, $(infodir)/ede, $(infodir)/semantic) ($(infodir)/edt): Use $(MAKEINFO_OPTS). diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-01-26 08:36:39 +0000 +++ doc/emacs/ChangeLog 2011-01-29 14:48:19 +0000 @@ -1,3 +1,11 @@ +2011-01-29 Eli Zaretskii + + * makefile.w32-in (MAKEINFO): Remove options, leave only program name. + (MAKEINFO_OPTS): New variable. + (ENVADD, $(infodir)/emacs): Use $(MAKEINFO_OPTS). + (emacs.html): New target. + (clean): Remove emacs.html. + 2011-01-23 Werner Lemberg * Makefile.in (MAKEINFO): Now controlled by `configure'. === modified file 'doc/emacs/makefile.w32-in' --- doc/emacs/makefile.w32-in 2011-01-26 08:36:39 +0000 +++ doc/emacs/makefile.w32-in 2011-01-29 14:48:19 +0000 @@ -27,7 +27,8 @@ infodir = $(srcdir)/../../info # The makeinfo program is part of the Texinfo distribution. -MAKEINFO = makeinfo --force +MAKEINFO = makeinfo +MAKEINFO_OPTS = --force -I$(srcdir) MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat INFO_TARGETS = $(infodir)/emacs DVI_TARGETS = emacs.dvi @@ -40,7 +41,7 @@ TEXI2DVI = texi2dvi ENVADD = $(srcdir)\..\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ - "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C + "MAKEINFO=$(MAKEINFO) $(MAKEINFO_OPTS)" /C EMACS_XTRA=\ $(srcdir)/arevert-xtra.texi \ @@ -113,11 +114,14 @@ $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS) $(infodir)/emacs: $(EMACSSOURCES) - $(MAKEINFO) emacs.texi + $(MAKEINFO) $(MAKEINFO_OPTS) emacs.texi emacs.dvi: $(EMACSSOURCES) $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi +emacs.html: $(EMACSSOURCES) + $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ emacs.texi + emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA) $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi @@ -127,6 +131,7 @@ clean: mostlyclean - $(DEL) *.dvi - $(DEL) $(infodir)/emacs* + - $(DEL_TREE) emacs.html distclean: clean - $(DEL) makefile === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-01-25 04:08:28 +0000 +++ doc/lispref/ChangeLog 2011-01-29 14:48:19 +0000 @@ -1,3 +1,11 @@ +2011-01-29 Eli Zaretskii + + * makefile.w32-in (texinfodir): New variable. + (usermanualdir): Remove as redundant with $(emacsdir). + (MAKEINFO): Remove options, leave only program name. + (MAKEINFO_OPTS): New variable. + (texinputdir, $(infodir)/elisp): Use $(MAKEINFO_OPTS). + 2011-01-25 Chong Yidong Richard Kim === modified file 'doc/lispref/makefile.w32-in' --- doc/lispref/makefile.w32-in 2011-01-26 08:36:39 +0000 +++ doc/lispref/makefile.w32-in 2011-01-29 14:48:19 +0000 @@ -22,20 +22,24 @@ srcdir = . infodir = $(srcdir)/../../info -usermanualdir = $(srcdir)/../emacs # Directory with emacsver.texi. emacsdir = $(srcdir)/../emacs +# Directory with the (customized) texinfo.tex file. +texinfodir = $(srcdir)/../misc # Redefine `TEX' if `tex' does not invoke plain TeX. For example: # TEX=platex TEX=tex INSTALL_INFO = install-info -MAKEINFO = makeinfo --force +MAKEINFO = makeinfo +MAKEINFO_OPTS = --force -I$(srcdir) -I$(emacsdir) # The environment variable and its value to add $(srcdir) to the path # searched for TeX input files. -texinputdir = $(srcdir)\..\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" /C +texinputdir = $(srcdir)\..\..\nt\envadd.bat \ + "TEXINPUTS=$(srcdir);$(texinputdir);$(TEXINPUTS)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFO_OPTS)" /C # The name of the manual: VERSION=2.9 @@ -110,12 +114,10 @@ $(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/elisp $(infodir)/elisp: $(srcs) - $(MAKEINFO) -I. -I$(srcdir) -I$(emacsdir) \ - -o $(infodir)/elisp $(srcdir)/elisp.texi + $(MAKEINFO) $(MAKEINFO_OPTS) -o $(infodir)/elisp $(srcdir)/elisp.texi elisp.dvi: $(srcs) - $(texinputdir) $(TEX) -I $(usermanualdir) -I$(emacsdir) \ - $(srcdir)/elisp.texi + $(texinputdir) $(TEX) $(srcdir)/elisp.texi clean: - $(DEL) *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-01-28 01:41:15 +0000 +++ doc/misc/ChangeLog 2011-01-29 14:48:19 +0000 @@ -1,3 +1,26 @@ +2011-01-29 Eli Zaretskii + + * makefile.w32-in (MAKEINFO): Remove options, leave only program name. + (MAKEINFO_OPTS): New variable. + (ENVADD, $(infodir)/emacs): Use $(MAKEINFO_OPTS). + ($(infodir)/info, $(infodir)/ccmode, $(infodir)/ada-mode) + ($(infodir)/pcl-cvs, $(infodir)/eshell, $(infodir)/cl) + ($(infodir)/dbus, $(infodir)/dired-x, $(infodir)/ediff) + ($(infodir)/flymake, $(infodir)/forms, $(infodir)/gnus) + ($(infodir)/message, $(infodir)/emacs-mime, $(infodir)/sieve) + ($(infodir)/pgg, $(infodir)/mh-e, $(infodir)/reftex) + ($(infodir)/remember, $(infodir)/sasl, $(infodir)/sc) + ($(infodir)/vip, $(infodir)/viper, $(infodir)/widget) + ($(infodir)/efaq, $(infodir)/autotype, $(infodir)/calc) + ($(infodir)/idlwave, $(infodir)/eudc, $(infodir)/ebrowse) + ($(infodir)/woman, $(infodir)/speedbar, $(infodir)/tramp) + ($(infodir)/ses, $(infodir)/smtpmail, $(infodir)/org) + ($(infodir)/url, $(infodir)/newsticker, $(infodir)/nxml-mode) + ($(infodir)/rcirc, $(infodir)/erc, $(infodir)/ert) + ($(infodir)/epa, $(infodir)/mairix-el, $(infodir)/auth) + ($(infodir)/eieio, $(infodir)/ede, $(infodir)/semantic) + ($(infodir)/edt): Use $(MAKEINFO_OPTS). + 2011-01-26 Lars Ingebrigtsen * gnus.texi (Article Date): Document gnus-article-update-lapsed-header. === modified file 'doc/misc/makefile.w32-in' --- doc/misc/makefile.w32-in 2011-01-26 08:36:39 +0000 +++ doc/misc/makefile.w32-in 2011-01-29 14:48:19 +0000 @@ -31,7 +31,8 @@ emacsdir = $(srcdir)/../emacs # The makeinfo program is part of the Texinfo distribution. -MAKEINFO = makeinfo --force -I$(emacsdir) +MAKEINFO = makeinfo +MAKEINFO_OPTS = --force -I$(emacsdir) MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat INFO_TARGETS = $(infodir)/ccmode \ $(infodir)/cl $(infodir)/dbus $(infodir)/dired-x \ @@ -71,7 +72,7 @@ TEXI2DVI = texi2dvi ENVADD = $(srcdir)\..\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ - "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C + "MAKEINFO=$(MAKEINFO) $(MAKEINFO_OPTS)" /C info: $(INFO_TARGETS) @@ -93,65 +94,65 @@ # texi filename, contrary to GNU standards. $(infodir)/info: $(INFOSOURCES) - $(MAKEINFO) --no-split -o $@ info.texi + $(MAKEINFO) $(MAKEINFO_OPTS) --no-split -o $@ info.texi info.dvi: $(INFOSOURCES) $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi $(infodir)/ccmode: cc-mode.texi - $(MAKEINFO) cc-mode.texi + $(MAKEINFO) $(MAKEINFO_OPTS) cc-mode.texi cc-mode.dvi: cc-mode.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi $(infodir)/ada-mode: ada-mode.texi - $(MAKEINFO) ada-mode.texi + $(MAKEINFO) $(MAKEINFO_OPTS) ada-mode.texi ada-mode.dvi: ada-mode.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi $(infodir)/pcl-cvs: pcl-cvs.texi - $(MAKEINFO) pcl-cvs.texi + $(MAKEINFO) $(MAKEINFO_OPTS) pcl-cvs.texi pcl-cvs.dvi: pcl-cvs.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi $(infodir)/eshell: eshell.texi - $(MAKEINFO) eshell.texi + $(MAKEINFO) $(MAKEINFO_OPTS) eshell.texi eshell.dvi: eshell.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi $(infodir)/cl: cl.texi - $(MAKEINFO) cl.texi + $(MAKEINFO) $(MAKEINFO_OPTS) cl.texi cl.dvi: cl.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi $(infodir)/dbus: dbus.texi - $(MAKEINFO) dbus.texi + $(MAKEINFO) $(MAKEINFO_OPTS) dbus.texi dbus.dvi: dbus.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/dbus.texi $(infodir)/dired-x: dired-x.texi - $(MAKEINFO) dired-x.texi + $(MAKEINFO) $(MAKEINFO_OPTS) dired-x.texi dired-x.dvi: dired-x.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi $(infodir)/ediff: ediff.texi - $(MAKEINFO) ediff.texi + $(MAKEINFO) $(MAKEINFO_OPTS) ediff.texi ediff.dvi: ediff.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi $(infodir)/flymake: flymake.texi - $(MAKEINFO) flymake.texi + $(MAKEINFO) $(MAKEINFO_OPTS) flymake.texi flymake.dvi: flymake.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi $(infodir)/forms: forms.texi - $(MAKEINFO) forms.texi + $(MAKEINFO) $(MAKEINFO_OPTS) forms.texi forms.dvi: forms.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi # gnus/message/emacs-mime/sieve/pgg are part of Gnus: $(infodir)/gnus: gnus.texi - $(MAKEINFO) gnus.texi + $(MAKEINFO) $(MAKEINFO_OPTS) gnus.texi gnus.dvi: gnus.texi sed -e "/@iflatex/,/@end iflatex/d" $(srcdir)/gnus.texi > gnustmp.texi $(ENVADD) $(TEXI2DVI) gnustmp.texi @@ -159,77 +160,77 @@ rm gnustmp.* # $(infodir)/message: message.texi - $(MAKEINFO) message.texi + $(MAKEINFO) $(MAKEINFO_OPTS) message.texi message.dvi: message.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi # $(infodir)/emacs-mime: emacs-mime.texi - $(MAKEINFO) --enable-encoding emacs-mime.texi + $(MAKEINFO) $(MAKEINFO_OPTS) --enable-encoding emacs-mime.texi emacs-mime.dvi: emacs-mime.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi # $(infodir)/sieve: sieve.texi - $(MAKEINFO) sieve.texi + $(MAKEINFO) $(MAKEINFO_OPTS) sieve.texi sieve.dvi: sieve.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/sieve.texi # $(infodir)/pgg: pgg.texi - $(MAKEINFO) pgg.texi + $(MAKEINFO) $(MAKEINFO_OPTS) pgg.texi pgg.dvi: pgg.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/pgg.texi $(infodir)/mh-e: mh-e.texi - $(MAKEINFO) mh-e.texi + $(MAKEINFO) $(MAKEINFO_OPTS) mh-e.texi mh-e.dvi: mh-e.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi $(infodir)/reftex: reftex.texi - $(MAKEINFO) reftex.texi + $(MAKEINFO) $(MAKEINFO_OPTS) reftex.texi reftex.dvi: reftex.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi $(infodir)/remember: remember.texi - $(MAKEINFO) remember.texi + $(MAKEINFO) $(MAKEINFO_OPTS) remember.texi remember.dvi: remember.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/remember.texi $(infodir)/sasl: sasl.texi - $(MAKEINFO) sasl.texi + $(MAKEINFO) $(MAKEINFO_OPTS) sasl.texi sasl.dvi: sasl.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/sasl.texi $(infodir)/sc: sc.texi - $(MAKEINFO) sc.texi + $(MAKEINFO) $(MAKEINFO_OPTS) sc.texi sc.dvi: sc.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi $(infodir)/vip: vip.texi - $(MAKEINFO) vip.texi + $(MAKEINFO) $(MAKEINFO_OPTS) vip.texi vip.dvi: vip.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi $(infodir)/viper: viper.texi - $(MAKEINFO) viper.texi + $(MAKEINFO) $(MAKEINFO_OPTS) viper.texi viper.dvi: viper.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi $(infodir)/widget: widget.texi - $(MAKEINFO) widget.texi + $(MAKEINFO) $(MAKEINFO_OPTS) widget.texi widget.dvi: widget.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi $(infodir)/efaq: faq.texi $(emacsdir)/emacsver.texi - $(MAKEINFO) faq.texi + $(MAKEINFO) $(MAKEINFO_OPTS) faq.texi faq.dvi: faq.texi $(emacsdir)/emacsver.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi $(infodir)/autotype: autotype.texi - $(MAKEINFO) autotype.texi + $(MAKEINFO) $(MAKEINFO_OPTS) autotype.texi autotype.dvi: autotype.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi $(infodir)/calc: calc.texi $(emacsdir)/emacsver.texi - $(MAKEINFO) calc.texi + $(MAKEINFO) $(MAKEINFO_OPTS) calc.texi calc.dvi: calc.texi $(emacsdir)/emacsver.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi @@ -237,112 +238,112 @@ # This is produced with --no-split to avoid making files whose # names clash on DOS 8+3 filesystems $(infodir)/idlwave: idlwave.texi - $(MAKEINFO) --no-split idlwave.texi + $(MAKEINFO) $(MAKEINFO_OPTS) --no-split idlwave.texi idlwave.dvi: idlwave.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi $(infodir)/eudc: eudc.texi - $(MAKEINFO) eudc.texi + $(MAKEINFO) $(MAKEINFO_OPTS) eudc.texi eudc.dvi: eudc.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi $(infodir)/ebrowse: ebrowse.texi - $(MAKEINFO) ebrowse.texi + $(MAKEINFO) $(MAKEINFO_OPTS) ebrowse.texi ebrowse.dvi: ebrowse.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi $(infodir)/woman: woman.texi - $(MAKEINFO) woman.texi + $(MAKEINFO) $(MAKEINFO_OPTS) woman.texi woman.dvi: woman.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi $(infodir)/speedbar: speedbar.texi - $(MAKEINFO) speedbar.texi + $(MAKEINFO) $(MAKEINFO_OPTS) speedbar.texi speedbar.dvi: speedbar.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi $(infodir)/tramp: tramp.texi - $(MAKEINFO) tramp.texi + $(MAKEINFO) $(MAKEINFO_OPTS) tramp.texi tramp.dvi: tramp.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi $(infodir)/ses: ses.texi - $(MAKEINFO) ses.texi + $(MAKEINFO) $(MAKEINFO_OPTS) ses.texi ses.dvi: ses.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi $(infodir)/smtpmail: smtpmail.texi - $(MAKEINFO) smtpmail.texi + $(MAKEINFO) $(MAKEINFO_OPTS) smtpmail.texi smtpmail.dvi: smtpmail.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi $(infodir)/org: org.texi - $(MAKEINFO) org.texi + $(MAKEINFO) $(MAKEINFO_OPTS) org.texi org.dvi: org.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/org.texi $(infodir)/url: url.texi - $(MAKEINFO) url.texi + $(MAKEINFO) $(MAKEINFO_OPTS) url.texi url.dvi: url.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/url.texi $(infodir)/newsticker: newsticker.texi - $(MAKEINFO) newsticker.texi + $(MAKEINFO) $(MAKEINFO_OPTS) newsticker.texi newsticker.dvi: newsticker.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/newsticker.texi $(infodir)/nxml-mode: nxml-mode.texi - $(MAKEINFO) nxml-mode.texi + $(MAKEINFO) $(MAKEINFO_OPTS) nxml-mode.texi nxml-mod.dvi: nxml-mode.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/nxml-mode.texi $(infodir)/rcirc: rcirc.texi - $(MAKEINFO) rcirc.texi + $(MAKEINFO) $(MAKEINFO_OPTS) rcirc.texi rcirc.dvi: rcirc.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/rcirc.texi $(infodir)/erc: erc.texi - $(MAKEINFO) erc.texi + $(MAKEINFO) $(MAKEINFO_OPTS) erc.texi erc.dvi: erc.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/erc.texi $(infodir)/ert: ert.texi - $(MAKEINFO) ert.texi + $(MAKEINFO) $(MAKEINFO_OPTS) ert.texi ert.dvi: ert.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/ert.texi $(infodir)/epa: epa.texi - $(MAKEINFO) epa.texi + $(MAKEINFO) $(MAKEINFO_OPTS) epa.texi epa.dvi: epa.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/epa.texi $(infodir)/mairix-el: mairix-el.texi - $(MAKEINFO) mairix-el.texi + $(MAKEINFO) $(MAKEINFO_OPTS) mairix-el.texi mairix-el.dvi: mairix-el.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/mairix-el.texi $(infodir)/auth: auth.texi - $(MAKEINFO) auth.texi + $(MAKEINFO) $(MAKEINFO_OPTS) auth.texi auth.dvi: auth.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/auth.texi $(infodir)/eieio: eieio.texi - $(MAKEINFO) eieio.texi + $(MAKEINFO) $(MAKEINFO_OPTS) eieio.texi eieio.dvi: eieio.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/eieio.texi $(infodir)/ede: ede.texi - $(MAKEINFO) ede.texi + $(MAKEINFO) $(MAKEINFO_OPTS) ede.texi ede.dvi: ede.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/ede.texi $(infodir)/semantic: semantic.texi - $(MAKEINFO) semantic.texi + $(MAKEINFO) $(MAKEINFO_OPTS) semantic.texi semantic.dvi: semantic.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/semantic.texi $(infodir)/edt: edt.texi - $(MAKEINFO) edt.texi + $(MAKEINFO) $(MAKEINFO_OPTS) edt.texi edt.dvi: edt.texi $(ENVADD) $(TEXI2DVI) $(srcdir)/edt.texi ------------------------------------------------------------ revno: 103023 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-01-29 15:41:34 +0200 message: Fix the bootstrap on MS-Windows. makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Fix the bootstrap. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-01-29 12:36:11 +0000 +++ nt/ChangeLog 2011-01-29 13:41:34 +0000 @@ -7,6 +7,7 @@ (cleanall-other-dirs-gmake, distclean-other-dirs-nmake) (distclean-other-dirs-gmake, maintainer-clean-other-dirs-nmake) (maintainer-clean-other-dirs-gmake): Recurse into ../lib as well. + (bootstrap-nmake, bootstrap-gmake): Fix the bootstrap. * configure.bat: Create lib/makefile. === modified file 'nt/makefile.w32-in' --- nt/makefile.w32-in 2011-01-29 12:36:11 +0000 +++ nt/makefile.w32-in 2011-01-29 13:41:34 +0000 @@ -162,7 +162,7 @@ cd ..\lib-src $(MAKE) $(MFLAGS) clean cd ..\lib - $(MAKE) $(MFLAGS) clean + $(MAKE) $(MFLAGS) clean all cd ..\src $(MAKE) $(MFLAGS) bootstrap $(MAKE) $(MFLAGS) bootstrap-clean @@ -178,7 +178,7 @@ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean - $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib clean all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean $(CP) $(BLD)/cmdproxy.exe ../bin ------------------------------------------------------------ revno: 103022 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2011-01-29 14:36:11 +0200 message: Fix the MS-Windows build broken by r102878 and emacs-23/r100409. lib/makefile.w32-in: lib/getopt_.h: New files. src/s/ms-w32.h (HAVE_MKTIME): Remove. src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib. (GNULIB): New variable. (LIBS): Add $(GNULIB). $(TEMACS): Depend on $(GNULIB). : Fix font-lock disrupted by a lone `"'. src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib. (GETOPTOBJS, GETOPTDEPS): Remove targets. (MOVEMAILOBJS): Replace $(GETOPTOBJS) with ../lib/$(BLD)/libgnu.$(A). ($(BLD)/movemail.exe): Depend on ../lib/getopt.h. (ECLIENTOBJS, ETAGSOBJ, CTAGSOBJ, EBROWSEOBJ): Replace getopt.o and getopt1.o with ../lib/$(BLD)/libgnu.$(A). (clean): Don't remove getopt.h. (getopt.h, $(BLD)/getopt.$(O), $(BLD)/getopt1.$(O)): Remove targets. ($(BLD)/ctags.$(O), $(BLD)/etags.$(O)): Replace getopt.h with $(EMACS_ROOT)/lib/getopt.h. nt/makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake) (bootstrap-nmake, bootstrap-gmake, bootstrap-clean-nmake) (bootstrap-clean-gmake, clean-other-dirs-nmake) (clean-other-dirs-gmake, cleanall-other-dirs-nmake) (cleanall-other-dirs-gmake, distclean-other-dirs-nmake) (distclean-other-dirs-gmake, maintainer-clean-other-dirs-nmake) (maintainer-clean-other-dirs-gmake): Recurse into ../lib as well. nt/configure.bat: Create lib/makefile. nt/config.nt (HAVE_MKTIME, BROKEN_MKTIME): Remove. (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE_DECL_GETENV) (HAVE_DECL_LOCALTIME_R, HAVE_WCHAR_T, PACKAGE, VERSION, inline) (_GL_UNUSED, _UNUSED_PARAMETER_): Add definitions, for gnulib. diff: === modified file 'ChangeLog' --- ChangeLog 2011-01-28 00:25:24 +0000 +++ ChangeLog 2011-01-29 12:36:11 +0000 @@ -1,3 +1,8 @@ +2011-01-29 Eli Zaretskii + + * lib/makefile.w32-in: + * lib/getopt_.h: New files. + 2011-01-28 Paul Eggert improve fix for MS-DOS file name clash === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2011-01-25 04:08:28 +0000 +++ lib-src/ChangeLog 2011-01-29 12:36:11 +0000 @@ -1,3 +1,22 @@ +2011-01-29 Eli Zaretskii + + * makefile.w32-in (LOCAL_FLAGS): Add -I../lib. + (GETOPTOBJS, GETOPTDEPS): Remove targets. + (MOVEMAILOBJS): Replace $(GETOPTOBJS) with ../lib/$(BLD)/libgnu.$(A). + ($(BLD)/movemail.exe): Depend on ../lib/getopt.h. + (ECLIENTOBJS, ETAGSOBJ, CTAGSOBJ, EBROWSEOBJ): Replace getopt.o + and getopt1.o with ../lib/$(BLD)/libgnu.$(A). + (clean): Don't remove getopt.h. + (getopt.h, $(BLD)/getopt.$(O), $(BLD)/getopt1.$(O)): Remove targets. + ($(BLD)/ctags.$(O), $(BLD)/etags.$(O)): Replace getopt.h with + $(EMACS_ROOT)/lib/getopt.h. + +2011-01-28 Chong Yidong + + * ntlib.c (setregid): New stub, renamed from setegid. + + * ntlib.h: Update prototype. + 2011-01-25 Chong Yidong * movemail.c (main): Use setregid instead of setegid, which is === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2011-01-25 04:08:28 +0000 +++ lib-src/makefile.w32-in 2011-01-29 12:36:11 +0000 @@ -24,8 +24,8 @@ VERSION = 24.0.50 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ - -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \ - -I../src + -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../lib \ + -I../nt/inc -I../src LIBS = $(BASE_LIBS) $(ADVAPI32) @@ -50,22 +50,19 @@ test-distrib: stamp_BLD $(BLD)/test-distrib.exe "$(BLD)/test-distrib.exe" "$(SRC)/testfile" -GETOPTOBJS = $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O) -GETOPTDEPS = $(GETOPTOBJS) getopt.h MOVEMAILOBJS = $(BLD)/movemail.$(O) \ $(BLD)/pop.$(O) \ - $(BLD)/ntlib.$(O) \ - $(GETOPTOBJS) + ../lib/$(BLD)/libgnu.$(A) \ + $(BLD)/ntlib.$(O) -$(BLD)/movemail.exe: $(MOVEMAILOBJS) getopt.h +$(BLD)/movemail.exe: $(MOVEMAILOBJS) ../lib/getopt.h # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(MOVEMAILOBJS) $(WSOCK32) $(LIBS) ECLIENT_CFLAGS = -DHAVE_GETCWD -DHAVE_STRERROR -DVERSION="\"$(VERSION)\"" ECLIENTOBJS = $(BLD)/emacsclient.$(O) \ - $(BLD)/getopt.$(O) \ - $(BLD)/getopt1.$(O) \ - $(BLD)/ntlib.$(O) + $(BLD)/ntlib.$(O) \ + ../lib/$(BLD)/libgnu.$(A) CLIENTRES = ../nt/$(BLD)/emacsclient.res $(CLIENTRES): ../nt/emacsclient.rc @@ -86,8 +83,7 @@ $(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c ETAGSOBJ = $(BLD)/etags.$(O) \ - $(BLD)/getopt.$(O) \ - $(BLD)/getopt1.$(O) \ + ../lib/$(BLD)/libgnu.$(A) \ $(BLD)/ntlib.$(O) \ $(BLD)/regex.$(O) @@ -96,8 +92,7 @@ EBROWSEOBJ = $(BLD)/ebrowse.$(O) \ - $(BLD)/getopt.$(O) \ - $(BLD)/getopt1.$(O) \ + ../lib/$(BLD)/libgnu.$(A) \ $(BLD)/ntlib.$(O) $(BLD)/ebrowse.exe: $(EBROWSEOBJ) @@ -112,8 +107,7 @@ $(CC) $(CFLAGS) $(ETAGS_CFLAGS) $(CC_OUT)$@ etags.c CTAGSOBJ = $(BLD)/ctags.$(O) \ - $(BLD)/getopt.$(O) \ - $(BLD)/getopt1.$(O) \ + ../lib/$(BLD)/libgnu.$(A) \ $(BLD)/ntlib.$(O) \ $(BLD)/regex.$(O) @@ -340,7 +334,6 @@ clean: - $(DEL) DOC* $(COMPILER_TEMP_FILES) - $(DEL) ctags.c - - $(DEL) getopt.h - $(DEL_TREE) $(OBJDIR) - $(DEL) stamp_BLD - $(DEL) echolisp.tmp @@ -365,9 +358,6 @@ echo $(CONFIG_H) has changed. Re-run configure.bat. exit -1 -getopt.h: getopt_.h - $(CP) $(ALL_DEPS) $@ - ### TAGS ### TAGS: $(BLD)/etags.exe *.c *.h @@ -392,7 +382,7 @@ $(EMACS_ROOT)/src/m/intel386.h \ $(EMACS_ROOT)/lib-src/../src/config.h \ $(SRC)/ntlib.h \ - $(SRC)/getopt.h + $(EMACS_ROOT)/lib/getopt.h $(BLD)/emacsclient.$(O) : \ $(SRC)/emacsclient.c \ @@ -407,7 +397,7 @@ $(EMACS_ROOT)/src/m/intel386.h \ $(EMACS_ROOT)/lib-src/../src/config.h \ $(SRC)/ntlib.h \ - $(SRC)/getopt.h + $(EMACS_ROOT)/lib/getopt.h $(BLD)/fakemail.$(O) : \ $(SRC)/fakemail.c \ @@ -424,21 +414,6 @@ $(EMACS_ROOT)/src/config.h \ $(MSTOOLS_SYS)/types.h -$(BLD)/getopt.$(O) : \ - $(SRC)/getopt.c \ - $(EMACS_ROOT)/src/s/ms-w32.h \ - $(EMACS_ROOT)/src/m/intel386.h \ - $(EMACS_ROOT)/src/config.h \ - $(SRC)/ntlib.h \ - $(SRC)/getopt.h - -$(BLD)/getopt1.$(O) : \ - $(SRC)/getopt1.c \ - $(EMACS_ROOT)/src/s/ms-w32.h \ - $(EMACS_ROOT)/src/m/intel386.h \ - $(EMACS_ROOT)/src/config.h \ - $(SRC)/getopt.h - $(BLD)/hexl.$(O) : \ $(SRC)/hexl.c @@ -500,7 +475,7 @@ # $(BLD)/make-docfile.$(O) $(BLD)/hexl.$(O) $(BLD)/fakemail.$(O): stamp_BLD -$(BLD)/test-distrib.$(O) $(GETOPTOBJS) $(MOVEMAILOBJS): stamp_BLD +$(BLD)/test-distrib.$(O) $(MOVEMAILOBJS): stamp_BLD $(BLD)/emacsclient.$(O) $(BLD)/etags.$(O) $(BLD)/regex.$(O): stamp_BLD === modified file 'lib-src/ntlib.c' --- lib-src/ntlib.c 2011-01-25 04:08:28 +0000 +++ lib-src/ntlib.c 2011-01-29 12:36:11 +0000 @@ -143,7 +143,7 @@ } int -setegid (unsigned gid) +setregid (unsigned rgid, unsigned gid) { return 0; } === modified file 'lib-src/ntlib.h' --- lib-src/ntlib.h 2011-01-25 04:08:28 +0000 +++ lib-src/ntlib.h 2011-01-29 12:36:11 +0000 @@ -38,7 +38,7 @@ unsigned getegid (void); unsigned getgid (void); int setuid (unsigned uid); -int setegid (unsigned gid); +int setregid (unsigned rgid, unsigned gid); char * getpass (const char * prompt); int fchown (int fd, unsigned uid, unsigned gid); === added file 'lib/getopt_.h' --- lib/getopt_.h 1970-01-01 00:00:00 +0000 +++ lib/getopt_.h 2011-01-29 12:36:11 +0000 @@ -0,0 +1,280 @@ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_GETOPT_H + +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif + + +/* The include_next requires a split double-inclusion guard. We must + also inform the replacement unistd.h to not recursively use + ; our definitions will be present soon enough. */ +#if HAVE_GETOPT_H +# define _GL_SYSTEM_GETOPT +# ifndef __GNUC__ +# include +# else +# include_next +# endif +# undef _GL_SYSTEM_GETOPT +#endif + +#ifndef _GL_GETOPT_H + +#ifndef __need_getopt +# define _GL_GETOPT_H 1 +#endif + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file (if the system had , + we have already included it). Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX && !defined __need_getopt +# if !HAVE_GETOPT_H +# include +# include +# include +# endif +# undef __need_getopt +# undef getopt +# undef getopt_long +# undef getopt_long_only +# undef optarg +# undef opterr +# undef optind +# undef optopt +# undef option +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# define getopt __GETOPT_ID (getopt) +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". libc uses prototypes + with "char *const *argv" that are incorrect because getopt_long and + getopt_long_only can permute argv; this is required for backward + compatibility (e.g., for LSB 2.0.1). + + This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', + but it caused redefinition warnings if both unistd.h and getopt.h were + included, since unistd.h includes getopt.h having previously defined + __need_getopt. + + The only place where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, but these are visible + only if __need_getopt is not defined, so it is quite safe to rewrite + the conditional as follows: +*/ +#if !defined __need_getopt +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#ifndef __need_getopt +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#endif + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* getopt.h */ +#endif /* getopt.h */ === added file 'lib/makefile.w32-in' --- lib/makefile.w32-in 1970-01-01 00:00:00 +0000 +++ lib/makefile.w32-in 2011-01-29 12:36:11 +0000 @@ -0,0 +1,154 @@ +# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. +# Copyright (C) 2011 Free Software Foundation, Inc. + +# This file is part of GNU Emacs. + +# GNU Emacs is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# GNU Emacs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with GNU Emacs. If not, see . + +ALL = gnulib + +.PHONY: $(ALL) + +LOCAL_FLAGS = -DHAVE_CONFIG_H=1 -I. -I../nt/inc -I../src +LIBS = + +GNULIBOBJS = $(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O) + +# +# Build the library +# +$(BLD)/libgnu.$(A): $(GNULIBOBJS) + - $(DEL) $@ + $(AR) $(AR_OUT)$@ $(ALL_DEPS) + +gnulib: stamp_BLD $(BLD)/libgnu.$(A) + +# +# Build everything +# +all: stamp_BLD $(ALL) + +### TAGS ### + +TAGS: + ../lib-src/$(BLD)/etags.exe *.c *.h + +### DEPENDENCIES ### + +EMACS_ROOT = .. +SRC = . + +$(BLD)/dtoastr.$(O) : \ + $(SRC)/dtoastr.c \ + $(SRC)/ftoastr.c \ + $(SRC)/ftoastr.h \ + $(SRC)/intprops.h \ + $(EMACS_ROOT)/src/config.h + +$(BLD)/getopt.$(O) : \ + $(SRC)/getopt.c \ + $(SRC)/getopt.h \ + $(SRC)/getopt_int.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h + +$(BLD)/getopt1.$(O) : \ + $(SRC)/getopt1.c \ + $(SRC)/getopt.h \ + $(SRC)/getopt_int.h \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h + +# The following dependencies are for supporting parallel builds, where +# we must make sure $(BLD) exists before any compilation starts. +# +$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD + +# +# Headers we would preprocess if we could. +# +getopt.h: getopt_.h + $(CP) $(ALL_DEPS) $@ + +# +# Maintenance +# +clean: + - $(DEL) $(COMPILER_TEMP_FILES) + - $(DEL) getopt.h + - $(DEL_TREE) $(OBJDIR) + - $(DEL) stamp_BLD + +distclean: cleanall + - $(DEL) TAGS + - $(DEL) Makefile + +maintainer-clean: distclean + - $(DEL) getopt_.h + +cleanall: clean + - $(DEL_TREE) obj + - $(DEL_TREE) obj-spd + - $(DEL_TREE) oo + - $(DEL_TREE) oo-spd + +# A dummy target to force other targets to be evaluated. +doit: + +getopt_.h: getopt.in.h $(ARG_NONNULL_H) + $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE) + +getopt_.h-CMD: doit + @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h. + @echo Run "$(MAKETYPE) getopt_h" in the lib/ subdirectory. + @echo You will need GNU Sed to be installed. + exit -1 + +getopt_.h-SH: doit + @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h. + @echo Run '"$(MAKETYPE) getopt_h"' in the lib/ subdirectory. + @echo You will need GNU Sed to be installed. + exit -1 + +# Generating getopt_.h from getopt.in.h. +# +# To avoid requiring all end users to install Sed, we have below +# a maintainer-only target that produces getopt_.h from getopt.in.h. +# For easier maintenance, all the strings that replace the @FOO@ +# placeholder are defined as Make macros below. + +HAVE_GETOPT_H = HAVE_GETOPT_H +INCLUDE_NEXT = include_next +PRAGMA_SYSTEM_HEADER = \#pragma GCC system_header +PRAGMA_COLUMNS = +NEXT_GETOPT_H = +ARG_NONNULL_H = ../arg-nonnull.h + +getopt_h: + - $(DEL) getopt_.h-t getopt_.h + sed -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \ + -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \ + -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \ + -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \ + -e "s!@NEXT_GETOPT_H@!$(NEXT_GETOPT_H)!g" \ + -e "/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)" \ + -e "/^\# include_next/i # ifndef __GNUC__" \ + -e "/^\# include_next/i # include " \ + -e "/^\# include_next/i # else" \ + -e "/^\# include_next/a # endif" \ + < getopt.in.h > getopt_.h-t + $(CP) getopt_.h-t getopt_.h + - $(DEL) getopt_.h-t === modified file 'nt/ChangeLog' --- nt/ChangeLog 2011-01-25 04:08:28 +0000 +++ nt/ChangeLog 2011-01-29 12:36:11 +0000 @@ -1,3 +1,20 @@ +2011-01-29 Eli Zaretskii + + * makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake) + (bootstrap-nmake, bootstrap-gmake, bootstrap-clean-nmake) + (bootstrap-clean-gmake, clean-other-dirs-nmake) + (clean-other-dirs-gmake, cleanall-other-dirs-nmake) + (cleanall-other-dirs-gmake, distclean-other-dirs-nmake) + (distclean-other-dirs-gmake, maintainer-clean-other-dirs-nmake) + (maintainer-clean-other-dirs-gmake): Recurse into ../lib as well. + + * configure.bat: Create lib/makefile. + + * config.nt (HAVE_MKTIME, BROKEN_MKTIME): Remove. + (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE_DECL_GETENV) + (HAVE_DECL_LOCALTIME_R, HAVE_WCHAR_T, PACKAGE, VERSION, inline) + (_GL_UNUSED, _UNUSED_PARAMETER_): Add definitions, for gnulib. + 2011-01-07 Eli Zaretskii * config.nt (HAVE___BUILTIN_UNWIND_INIT) [GCC >= 2.8]: Define. === modified file 'nt/config.nt' --- nt/config.nt 2011-01-25 04:08:28 +0000 +++ nt/config.nt 2011-01-29 12:36:11 +0000 @@ -224,7 +224,6 @@ #undef HAVE_SETSID #undef HAVE_FPATHCONF #undef HAVE_SELECT -#undef HAVE_MKTIME #undef HAVE_EUIDACCESS #undef HAVE_GETPAGESIZE #undef HAVE_GET_CURRENT_DIR_NAME @@ -273,6 +272,67 @@ /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY +/* Preprocessor macros needed for gnulib imports. */ + +/* Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works. */ +#ifdef __GNUC__ +#define HAVE_ATTRIBUTE_ALIGNED 1 +#else +#undef HAVE_ATTRIBUTE_ALIGNED +#endif + +/* Define to 1 if strtold conforms to C99. */ +#ifdef __GNUC__ +#define HAVE_C99_STRTOLD 1 +#else +#undef HAVE_C99_STRTOLD +#endif + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you + don't. */ +#undef HAVE_DECL_LOCALTIME_R + +/* Define to 1 if you have the `localtime_r' function. */ +#undef HAVE_LOCALTIME_R + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Name of package */ +#define PACKAGE "emacs" + +/* FIXME: This is defined by the various makefile.w32-in files for + now. Revisit if/when VERSION from config.h is used by any + Makefile.in files. */ +#if 0 +/* Version number of package */ +#define VERSION "24.0.50" +#endif + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* End of gnulib-related stuff. */ + /* If using GNU, then support inline function declarations. */ #ifdef __GNUC__ #define INLINE __inline__ @@ -344,11 +404,6 @@ #define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0) #endif -/* Avoid link-time collision with system mktime if we will use our own. */ -#if ! HAVE_MKTIME || BROKEN_MKTIME -#define mktime emacs_mktime -#endif - #define my_strftime nstrftime /* for strftime.c */ #ifndef WINDOWSNT === modified file 'nt/configure.bat' --- nt/configure.bat 2011-01-25 04:08:28 +0000 +++ nt/configure.bat 2011-01-29 12:36:11 +0000 @@ -679,6 +679,7 @@ copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile if exist ..\admin\unidata copy /b config.settings+%MAKECMD%.defs+..\admin\unidata\makefile.w32-in ..\admin\unidata\makefile copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile +copy /b config.settings+%MAKECMD%.defs+..\lib\makefile.w32-in ..\lib\makefile copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile copy /b config.settings+%MAKECMD%.defs+..\doc\emacs\makefile.w32-in ..\doc\emacs\makefile copy /b config.settings+%MAKECMD%.defs+..\doc\misc\makefile.w32-in ..\doc\misc\makefile === modified file 'nt/makefile.w32-in' --- nt/makefile.w32-in 2011-01-25 04:08:28 +0000 +++ nt/makefile.w32-in 2011-01-29 12:36:11 +0000 @@ -92,6 +92,8 @@ all: which-sh stamp_BLD $(ALL) $(CLIENTRES) maybe-bootstrap all-other-dirs-$(MAKETYPE) all-other-dirs-nmake: addsection + cd ..\lib + $(MAKE) $(MFLAGS) all cd ..\lib-src $(MAKE) $(MFLAGS) all cd ..\src @@ -103,6 +105,7 @@ cd ..\nt all-other-dirs-gmake: addsection + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src all $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp all @@ -158,6 +161,8 @@ $(MAKE) $(MFLAGS) clean cd ..\lib-src $(MAKE) $(MFLAGS) clean + cd ..\lib + $(MAKE) $(MFLAGS) clean cd ..\src $(MAKE) $(MFLAGS) bootstrap $(MAKE) $(MFLAGS) bootstrap-clean @@ -173,6 +178,7 @@ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean $(CP) $(BLD)/cmdproxy.exe ../bin @@ -184,11 +190,14 @@ bootstrap-clean-nmake: cd ..\src $(MAKE) $(MFLAGS) bootstrap-clean + cd ..\lib + $(MAKE) $(MFLAGS) clean cd ..\lisp $(MAKE) $(MFLAGS) bootstrap-clean bootstrap-clean-gmake: $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean $(INSTALL_DIR): @@ -297,6 +306,8 @@ - $(DEL) ../etc/DOC ../etc/DOC-X clean-other-dirs-nmake: + cd ..\lib + $(MAKE) $(MFLAGS) clean cd ..\lib-src $(MAKE) $(MFLAGS) clean cd ..\src @@ -314,6 +325,7 @@ cd ..\nt clean-other-dirs-gmake: + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim clean @@ -323,6 +335,8 @@ $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref clean cleanall-other-dirs-nmake: + cd ..\lib + $(MAKE) $(MFLAGS) cleanall cd ..\lib-src $(MAKE) $(MFLAGS) cleanall cd ..\src @@ -330,6 +344,7 @@ cd ..\nt cleanall-other-dirs-gmake: + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib cleanall $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall @@ -355,6 +370,8 @@ distclean: distclean-other-dirs-$(MAKETYPE) top-distclean distclean-other-dirs-nmake: + cd ..\lib + $(MAKE) $(MFLAGS) distclean cd ..\lib-src $(MAKE) $(MFLAGS) distclean cd ..\src @@ -374,6 +391,7 @@ cd ..\nt distclean-other-dirs-gmake: + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib distclean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src distclean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src distclean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp distclean @@ -386,6 +404,8 @@ maintainer-clean: maintainer-clean-other-dirs-$(MAKETYPE) top-distclean maintainer-clean-other-dirs-nmake: + cd ..\lib + $(MAKE) $(MFLAGS) maintainer-clean cd ..\lib-src $(MAKE) $(MFLAGS) maintainer-clean cd ..\src @@ -405,6 +425,7 @@ cd ..\nt maintainer-clean-other-dirs-gmake: + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib maintainer-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src maintainer-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src maintainer-clean $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp maintainer-clean @@ -424,6 +445,7 @@ ../lib-src/$(BLD)/etags $(CURDIR)/*.c $(MAKE) $(MFLAGS) -C ../src TAGS TAGS-LISP $(MAKE) $(MFLAGS) -C ../lib-src TAGS + $(MAKE) $(MFLAGS) -C ../lib TAGS TAGS-nmake: echo This target is not supported with NMake === modified file 'src/ChangeLog' --- src/ChangeLog 2011-01-29 11:30:11 +0000 +++ src/ChangeLog 2011-01-29 12:36:11 +0000 @@ -1,3 +1,13 @@ +2011-01-29 Eli Zaretskii + + * s/ms-w32.h (HAVE_MKTIME): Remove. + + * makefile.w32-in (LOCAL_FLAGS): Add -I../lib. + (GNULIB): New variable. + (LIBS): Add $(GNULIB). + $(TEMACS): Depend on $(GNULIB). + : Fix font-lock disrupted by a lone `"'. + 2011-01-29 Jan Djärv * nsselect.m (ns_string_from_pasteboard): Get length of string === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2011-01-25 04:08:28 +0000 +++ src/makefile.w32-in 2011-01-29 12:36:11 +0000 @@ -28,7 +28,7 @@ # HAVE_CONFIG_H is required by some generic gnu sources stuck into # the emacs source tree. # -LOCAL_FLAGS = -Demacs=1 -DHAVE_CONFIG_H -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS) +LOCAL_FLAGS = -Demacs=1 -DHAVE_CONFIG_H -I../lib -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS) SRC = . EMACS = $(BLD)/emacs.exe @@ -40,6 +40,7 @@ TOBJ = $(BLD)/firstfile.$(O) TRES = $(BLD)/emacs.res TLASTLIB = $(BLD)/lastfile.$(A) +GNULIB = ../lib/$(BLD)/libgnu.$(A) DOC = $(OBJDIR)/etc/DOC-X @@ -140,6 +141,7 @@ $(TLIB1) \ $(TLIB2) \ $(TLASTLIB) \ + $(GNULIB) \ $(WINMM) \ $(ADVAPI32) \ $(GDI32) \ @@ -174,7 +176,7 @@ # temacs: stamp_BLD $(TEMACS) $(TEMACS): $(TLIB0) $(TLIB1) $(TLIB2) $(TLASTLIB) $(TOBJ) $(TRES) \ - ../nt/$(BLD)/addsection.exe + ../nt/$(BLD)/addsection.exe $(GNULIB) $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 21 @@ -192,6 +194,9 @@ echo $(OBJ2) \>> buildobj.h echo ^">> buildobj.h +# " +# The above line is here to countermand the single quote +# on the last "echo" command above, wrt font-lock. make-buildobj-SH: echo '#define BUILDOBJ $(DQUOTE)\' > buildobj.h echo $(OBJ0) '\' >> buildobj.h === modified file 'src/s/ms-w32.h' --- src/s/ms-w32.h 2011-01-25 04:08:28 +0000 +++ src/s/ms-w32.h 2011-01-29 12:36:11 +0000 @@ -150,7 +150,6 @@ #undef HAVE_SETSID #undef HAVE_FPATHCONF #define HAVE_SELECT 1 -#define HAVE_MKTIME 1 #undef HAVE_EUIDACCESS #define HAVE_GETPAGESIZE 1 #define HAVE_TZSET 1 ------------------------------------------------------------ revno: 103021 committer: Jan D. branch nick: trunk timestamp: Sat 2011-01-29 12:30:11 +0100 message: Handle nul-character in copy/paste (Bug#7934). * nsselect.m (ns_string_from_pasteboard): Get length of string and use make_string instead of build_string. (ns_string_to_pasteboard_internal): Use initWithBytesNoCopy instead of stringWithUTF8String (Bug#7934). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-01-29 10:36:16 +0000 +++ src/ChangeLog 2011-01-29 11:30:11 +0000 @@ -1,3 +1,10 @@ +2011-01-29 Jan Djärv + + * nsselect.m (ns_string_from_pasteboard): Get length of string + and use make_string instead of build_string (Bug#7934). + (ns_string_to_pasteboard_internal): Use initWithBytesNoCopy + instead of stringWithUTF8String (Bug#7934). + 2011-01-29 Anders Lindgren (tiny change) * nsfont.m (nsfont_open): Ensure that fonts with inexact === modified file 'src/nsselect.m' --- src/nsselect.m 2011-01-25 04:08:28 +0000 +++ src/nsselect.m 2011-01-29 11:30:11 +0000 @@ -153,8 +153,10 @@ CHECK_STRING (str); utfStr = SDATA (str); - nsStr = [NSString stringWithUTF8String: utfStr]; - + nsStr = [[NSString alloc] initWithBytesNoCopy: utfStr + length: SBYTES (str) + encoding: NSUTF8StringEncoding + freeWhenDone: NO]; if (gtype == nil) { [pb declareTypes: ns_send_types owner: nil]; @@ -166,6 +168,7 @@ { [pb setString: nsStr forType: gtype]; } + [nsStr release]; } } @@ -303,6 +306,7 @@ { NSString *type, *str; const char *utfStr; + int length; type = [pb availableTypeFromArray: ns_return_types]; if (type == nil) @@ -344,17 +348,23 @@ options: NSLiteralSearch range: NSMakeRange (0, [mstr length])]; utfStr = [mstr UTF8String]; - if (!utfStr) - utfStr = [mstr cString]; + length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; + + if (!utfStr) + { + utfStr = [mstr cString]; + length = strlen (utfStr); + } } NS_HANDLER { message1 ("ns_string_from_pasteboard: UTF8String failed\n"); utfStr = [str lossyCString]; + length = strlen (utfStr); } NS_ENDHANDLER - return build_string (utfStr); + return make_string (utfStr, length); } ------------------------------------------------------------ revno: 103020 committer: Daiki Ueno branch nick: trunk timestamp: Sat 2011-01-29 20:05:35 +0900 message: Don't throw an error when any of encryption subkeys are expired. * epg.el (epg--status-KEYEXPIRED, epg--status-KEYREVOKED): Don't presume KEYEXPIRED and KEYREVOKED to be a fatal error status (Bug#7931). diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-29 06:08:24 +0000 +++ lisp/ChangeLog 2011-01-29 11:05:35 +0000 @@ -1,3 +1,9 @@ +2011-01-29 Daiki Ueno + + * epg.el (epg--status-KEYEXPIRED, epg--status-KEYREVOKED): Don't + presume KEYEXPIRED and KEYREVOKED to be a fatal error status + (Bug#7931). + 2011-01-29 Stefan Monnier * progmodes/compile.el: Avoid an N² behavior in grep. === modified file 'lisp/epg.el' --- lisp/epg.el 2011-01-25 04:08:28 +0000 +++ lisp/epg.el 2011-01-29 11:05:35 +0000 @@ -1561,14 +1561,14 @@ (defun epg--status-KEYEXPIRED (context string) (epg-context-set-result-for - context 'error + context 'key (cons (list 'key-expired (cons 'expiration-time (epg--time-from-seconds string))) (epg-context-result-for context 'error)))) (defun epg--status-KEYREVOKED (context string) (epg-context-set-result-for - context 'error + context 'key (cons '(key-revoked) (epg-context-result-for context 'error)))) ------------------------------------------------------------ revno: 103019 committer: Jan D. branch nick: trunk timestamp: Sat 2011-01-29 11:36:16 +0100 message: Handle floating point errors in ns-fonts (Bug#7887). * nsfont.m (nsfont_open): Ensure that fonts with inexact descenders would not become one pixel too tall (Bug#7887). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-01-28 20:30:38 +0000 +++ src/ChangeLog 2011-01-29 10:36:16 +0000 @@ -1,3 +1,8 @@ +2011-01-29 Anders Lindgren (tiny change) + + * nsfont.m (nsfont_open): Ensure that fonts with inexact + descenders would not become one pixel too tall (Bug#7887). + 2011-01-28 Chong Yidong * keyboard.c (make_lispy_position): For clicks on right fringe or === modified file 'src/nsfont.m' --- src/nsfont.m 2011-01-25 04:08:28 +0000 +++ src/nsfont.m 2011-01-29 10:36:16 +0000 @@ -809,6 +809,14 @@ const char *fontName = [[nsfont fontName] UTF8String]; int len = strlen (fontName); + /* The values specified by fonts are not always exact. For + * example, a 6x8 font could specify that the descender is + * -2.00000405... (represented by 0xc000000220000000). Without + * adjustment, the code below would round the descender to -3, + * resulting in a font that would be one pixel higher than + * intended. */ + CGFloat adjusted_descender = [sfont descender] + 0.0001; + #ifdef NS_IMPL_GNUSTEP font_info->nsfont = sfont; #else @@ -830,7 +838,7 @@ brect = [sfont boundingRectForFont]; full_height = brect.size.height; - min_height = [sfont ascender] - [sfont descender]; + min_height = [sfont ascender] - adjusted_descender; hd = full_height - min_height; /* standard height, similar to Carbon. Emacs.app: was 0.5 by default. */ @@ -845,10 +853,10 @@ /* max bounds */ font_info->max_bounds.ascent = lrint (hshrink * [sfont ascender] + expand * hd/2); - /* [sfont descender] is usually negative. Use floor to avoid + /* Descender is usually negative. Use floor to avoid clipping descenders. */ font_info->max_bounds.descent = - -lrint (floor(hshrink* [sfont descender] - expand*hd/2)); + -lrint (floor(hshrink* adjusted_descender - expand*hd/2)); font_info->height = font_info->max_bounds.ascent + font_info->max_bounds.descent; font_info->max_bounds.width = lrint (font_info->width); @@ -884,7 +892,7 @@ /* set up metrics portion of font struct */ font->ascent = lrint([sfont ascender]); - font->descent = -lrint(floor([sfont descender])); + font->descent = -lrint(floor(adjusted_descender)); font->min_width = ns_char_width(sfont, '|'); font->space_width = lrint (ns_char_width (sfont, ' ')); font->average_width = lrint (font_info->width); ------------------------------------------------------------ revno: 103018 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2011-01-29 01:08:24 -0500 message: * lisp/progmodes/compile.el: Avoid an N² behavior in grep. (compilation--previous-directory): New fun. (compilation--previous-directory-cache): New var. (compilation--remove-properties): Flush it. (compilation-directory-properties, compilation-error-properties): Use the new fun to speed up looking for the current directory. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-29 03:12:32 +0000 +++ lisp/ChangeLog 2011-01-29 06:08:24 +0000 @@ -1,3 +1,12 @@ +2011-01-29 Stefan Monnier + + * progmodes/compile.el: Avoid an N² behavior in grep. + (compilation--previous-directory): New fun. + (compilation--previous-directory-cache): New var. + (compilation--remove-properties): Flush it. + (compilation-directory-properties, compilation-error-properties): + Use the new fun to speed up looking for the current directory. + 2011-01-29 Chong Yidong * vc/vc-hg.el (vc-hg-history): New var. @@ -18,8 +27,8 @@ * vc/vc-bzr.el (vc-bzr-async-command): Convert into a wrapper for vc-do-async-command. - * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): Callers - changed. + * vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): + Callers changed. 2011-01-28 Leo === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2011-01-28 22:06:20 +0000 +++ lisp/progmodes/compile.el 2011-01-29 06:08:24 +0000 @@ -834,6 +834,39 @@ (:conc-name compilation--message->)) loc type end-loc) +(defvar compilation--previous-directory-cache nil) +(make-variable-buffer-local 'compilation--previous-directory-cache) +(defun compilation--previous-directory (pos) + "Like (previous-single-property-change POS 'compilation-directory), but faster." + ;; This avoids an N² behavior when there's no/few compilation-directory + ;; entries, in which case each call to previous-single-property-change + ;; ends up having to walk very far back to find the last change. + (let* ((cache (and compilation--previous-directory-cache + (<= (car compilation--previous-directory-cache) pos) + (car compilation--previous-directory-cache))) + (prev + (previous-single-property-change + pos 'compilation-directory nil cache))) + (cond + ((null cache) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) (copy-marker prev))) + prev) + ((eq prev cache) + (if cache + (set-marker (car compilation--previous-directory-cache) pos) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) nil))) + (cdr compilation--previous-directory-cache)) + (t + (if cache + (progn + (set-marker (car compilation--previous-directory-cache) pos) + (setcdr compilation--previous-directory-cache (copy-marker prev))) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) (copy-marker prev)))) + prev)))) + ;; Internal function for calculating the text properties of a directory ;; change message. The compilation-directory property is important, because it ;; is the stack of nested enter-messages. Relative filenames on the following @@ -841,7 +874,7 @@ (defun compilation-directory-properties (idx leave) (if leave (setq leave (match-end leave))) ;; find previous stack, and push onto it, or if `leave' pop it - (let ((dir (previous-single-property-change (point) 'compilation-directory))) + (let ((dir (compilation--previous-directory (point)))) (setq dir (if dir (or (get-text-property (1- dir) 'compilation-directory) (get-text-property dir 'compilation-directory)))) `(font-lock-face ,(if leave @@ -900,8 +933,7 @@ (match-string-no-properties file)))) (let ((dir (unless (file-name-absolute-p file) - (let ((pos (previous-single-property-change - (point) 'compilation-directory))) + (let ((pos (compilation--previous-directory (point)))) (when pos (or (get-text-property (1- pos) 'compilation-directory) (get-text-property pos 'compilation-directory))))))) @@ -1064,6 +1096,14 @@ (defun compilation--remove-properties (&optional start end) (with-silent-modifications + (cond + ((or (not compilation--previous-directory-cache) + (<= (car compilation--previous-directory-cache) start))) + ((or (not (cdr compilation--previous-directory-cache)) + (<= (cdr compilation--previous-directory-cache) start)) + (set-marker (car compilation--previous-directory-cache) start)) + (t (setq compilation--previous-directory-cache nil))) + ;; When compile.el used font-lock directly, we could just remove all ;; our text-properties in one go, but now that we manually place ;; font-lock-face, we have to be careful to only remove the font-lock-face