Mercurial > emacs
changeset 107630:074a7ce7d59b
Merge from mainline.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 05 Feb 2010 09:28:04 -0500 |
parents | ab03eb9d2050 (current diff) 2e763e444bc2 (diff) |
children | 79cb7ef6ffda |
files | |
diffstat | 43 files changed, 868 insertions(+), 301 deletions(-) [+] |
line wrap: on
line diff
--- a/.bzrignore Sat Jan 30 10:20:14 2010 -0500 +++ b/.bzrignore Fri Feb 05 09:28:04 2010 -0500 @@ -20,6 +20,7 @@ stamp_BLD subdirs.el TAGS +TAGS-LISP info/* leim/leim-list.el leim/quail/*.el
--- a/ChangeLog Sat Jan 30 10:20:14 2010 -0500 +++ b/ChangeLog Fri Feb 05 09:28:04 2010 -0500 @@ -1,3 +1,7 @@ +2010-01-31 Juri Linkov <juri@jurta.org> + + * .bzrignore: Add TAGS-LISP. + 2010-01-23 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) * configure.in: Check for utmp.h availability (FreeBSD 9.x lacks
--- a/admin/notes/bugtracker Sat Jan 30 10:20:14 2010 -0500 +++ b/admin/notes/bugtracker Fri Feb 05 09:28:04 2010 -0500 @@ -403,6 +403,17 @@ maintainers (ie, bug-gnu-emacs). These have some changed headers (Resent-*, Subject, etc). +** What do the pkgreport.cgi sort options mean? + +"normal" = by open/closed status, then severity, then tag, then bug number + +"oldview" = as above, but without the tag part + +"age" = as normal, but sort in decreasing order of last modification +time, rather than by increasing bug number + +"raw" = ? + ** ChangeLog issues *** When you fix a bug, it can be helpful to put the bug number in the @@ -527,6 +538,15 @@ The latter is because that is the address that debbugs actually sends to. An /etc/aliases entry redirects it to the real emacs-bug-tracker address. +** Recovering from moderation mistakes + +All discarded messages are stored in /var/lib/mailman/spam. +If a non-spam message accidentally gets discarded, just do: + +cat /var/lib/mailman/spam/not-really-spam.msg | /usr/lib/debbugs/receive +... check it works ... +mv /var/lib/mailman/spam/not-really-spam.msg /var/lib/mailman/not-spam/ + ** Administrivia The debbugs-submit list should have the administrivia option off,
--- a/doc/emacs/ChangeLog Sat Jan 30 10:20:14 2010 -0500 +++ b/doc/emacs/ChangeLog Fri Feb 05 09:28:04 2010 -0500 @@ -1,3 +1,9 @@ +2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * display.texi (Useless Whitespace, Text Display): + * custom.texi (Init Examples): Avoid obsolete special default variables + like default-major-mode. + 2010-01-24 Mark A. Hershberger <mah@everybody.org> * programs.texi (Other C Commands): Replace reference to obsolete
--- a/doc/emacs/custom.texi Sat Jan 30 10:20:14 2010 -0500 +++ b/doc/emacs/custom.texi Fri Feb 05 09:28:04 2010 -0500 @@ -2275,7 +2275,7 @@ Make Text mode the default mode for new buffers. @example -(setq default-major-mode 'text-mode) +(setq-default major-mode 'text-mode) @end example Note that @code{text-mode} is used because it is the command for
--- a/doc/emacs/display.texi Sat Jan 30 10:20:14 2010 -0500 +++ b/doc/emacs/display.texi Fri Feb 05 09:28:04 2010 -0500 @@ -877,7 +877,6 @@ @key{RET}}. This command does not remove newline characters. @vindex indicate-empty-lines -@vindex default-indicate-empty-lines @cindex unused lines @cindex fringes, and unused line indication Emacs can indicate unused lines at the end of the window with a @@ -887,11 +886,11 @@ this image in the fringe. To enable this feature, set the buffer-local variable -@code{indicate-empty-lines} to a non-@code{nil} value. The default -value of this variable is controlled by the variable -@code{default-indicate-empty-lines}; by setting that variable, you -can enable or disable this feature for all new buffers. (This feature -currently doesn't work on text-only terminals.) +@code{indicate-empty-lines} to a non-@code{nil} value. You can enable +or disable this feature for all new buffers by setting the default +value of this variable, e.g.@: @code{(setq-default +indicate-empty-lines t)};. (This feature currently doesn't work on +text-only terminals.) @node Selective Display @section Selective Display @@ -1083,17 +1082,15 @@ printing characters (octal codes above 0400). @vindex tab-width -@vindex default-tab-width Some @acronym{ASCII} control characters are displayed in special ways. The newline character (octal code 012) is displayed by starting a new line. The tab character (octal code 011) is displayed by moving to the next tab stop column (normally every 8 columns). The number of spaces per tab is controlled by the variable @code{tab-width}, which must have an integer value between 1 and 1000, inclusive, and is made -local by changing it. Note that how the tab character in the buffer +buffer-local by changing it. Note that how the tab character in the buffer is displayed has nothing to do with the definition of @key{TAB} as a -command. The variable @code{default-tab-width} controls the default -value of this variable for buffers where you have not set it locally. +command. Other @acronym{ASCII} control characters are normally displayed as a caret (@samp{^}) followed by the non-control version of the character; thus,
--- a/doc/lispintro/ChangeLog Sat Jan 30 10:20:14 2010 -0500 +++ b/doc/lispintro/ChangeLog Fri Feb 05 09:28:04 2010 -0500 @@ -1,3 +1,8 @@ +2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp-intro.texi (Text and Auto-fill, Mode Line): + Avoid obsolete special default variables like default-major-mode. + 2009-12-09 David Robinow <drobinow@gmail.com> (tiny change) * makefile.w32-in: Use parenthesis for macros for nmake
--- a/doc/lispintro/emacs-lisp-intro.texi Sat Jan 30 10:20:14 2010 -0500 +++ b/doc/lispintro/emacs-lisp-intro.texi Fri Feb 05 09:28:04 2010 -0500 @@ -17346,10 +17346,10 @@ @smallexample @group ;;; Text mode and Auto Fill mode -; The next two lines put Emacs into Text mode -; and Auto Fill mode, and are for writers who -; want to start writing prose rather than code. -(setq default-major-mode 'text-mode) +;; The next two lines put Emacs into Text mode +;; and Auto Fill mode, and are for writers who +;; want to start writing prose rather than code. +(setq-default major-mode 'text-mode) (add-hook 'text-mode-hook 'turn-on-auto-fill) @end group @end smallexample @@ -18257,7 +18257,7 @@ @need 1700 @node Mode Line, , Miscellaneous, Emacs Initialization @section A Modified Mode Line -@vindex default-mode-line-format +@vindex mode-line-format @cindex Mode line format Finally, a feature I really like: a modified mode line. @@ -18282,7 +18282,7 @@ @group ;; Set a Mode Line that tells me which machine, which directory, ;; and which line I am on, plus the other customary information. -(setq default-mode-line-format +(setq-default mode-line-format (quote (#("-" 0 1 (help-echo
--- a/doc/lispref/ChangeLog Sat Jan 30 10:20:14 2010 -0500 +++ b/doc/lispref/ChangeLog Fri Feb 05 09:28:04 2010 -0500 @@ -1,3 +1,8 @@ +2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * display.texi (Line Height): Avoid obsolete special default variables + like default-major-mode. + 2010-01-28 Alan Mackenzie <acm@muc.de> * display.texi (Auto Faces): Say fontification-functions is called
--- a/doc/lispref/display.texi Sat Jan 30 10:20:14 2010 -0500 +++ b/doc/lispref/display.texi Fri Feb 05 09:28:04 2010 -0500 @@ -1768,7 +1768,6 @@ There are several ways to specify the line spacing for different parts of Emacs text. -@vindex default-line-spacing On graphical terminals, you can specify the line spacing for all lines in a frame, using the @code{line-spacing} frame parameter (@pxref{Layout Parameters}). However, if the default value of
--- a/lisp/ChangeLog Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/ChangeLog Fri Feb 05 09:28:04 2010 -0500 @@ -1,3 +1,149 @@ +2010-02-05 Michael Albinus <michael.albinus@gmx.de> + + * net/ange-ftp.el (ange-ftp-insert-directory): + * net/tramp-imap.el (tramp-imap-handle-insert-directory): + * net/tramp-smb.el (tramp-smb-handle-insert-directory): + Handle also directories. (Bug#5478) + +2010-02-05 Glenn Morris <rgm@gnu.org> + + * progmodes/f90.el (f90-font-lock-keywords-2): Fix `enum'. + +2010-02-05 Chong Yidong <cyd@stupidchicken.com> + + * startup.el (command-line-1): Convert options beginning with a + single dash as well (Bug#5519). + +2010-02-05 Stefan Monnier <monnier@iro.umontreal.ca> + + Make `initials' completion work for /hh -> /home/horn again (bug#5524). + * minibuffer.el (completion-initials-expand): Only check the presence + of delims *within* the boundaries, since otherwise the / delim is + always found for files. + + Fix up various corner case problems. + * doc-view.el (doc-view-last-page-number): New function. + (doc-view-mode, doc-view-last-page, doc-view-goto-page): Use it. + (doc-view-goto-page): Avoid inf-loops when the conversion fails. + (doc-view-kill-proc): Avoid inf-loop in freak cases. + (doc-view-reconvert-doc): Use the new recursive delete-directory. + (doc-view-convert-current-doc): Don't create the resolution.el file + here any more. + (doc-view-pdf/ps->png): Do it here instead. + (doc-view-already-converted-p): Check that resolution.el is present. + (doc-view-pdf->png): Don't rely on doc-view-pdf/ps->png for the few + windows that are not yet showing images. + +2010-02-04 Alan Mackenzie <acm@muc.de> + + Change strategy for marking < and > as template delimiters: mark + them strictly in matching pairs. + + * cc-mode.el (c-before-change): + Use c-get-state-before-change-functions. + (c-common-init): Adapt to use + c-get-state-before-change-functions (note plural). + + * cc-langs.el (c-no-parens-syntax-table): New syntax table, used + for searching syntactically for matching <s and >s. + (c-get-state-before-change-functions): New language variable (note + the plural) which supersedes c-get-state-before-change-function. + + * cc-engine.el (c-clear-<-pair-props, c-clear->-pair-props) + (c-clear-<>-pair-props, c-clear-<-pair-props-if-match-after) + (c-clear->-pair-props-if-match-before) + (c-before-change-check-<>-operators): New functions. + (c-after-change-check-<>-operators): Use macro + c-unmark-<->-as-paren. + + * cc-defs.el (c-search-backward-char-property): New macro. + + * cc-cmds.el (c-electric-lt-gt): Do not set text properties on < + and > any more. (These will be handled by font locking.) + +2010-02-04 Michael Albinus <michael.albinus@gmx.de> + + * dired.el (dired-revert): If DIRED-DIRECTORY is a cons cell, call + `dired-uncache' for every elemnt which is an absolute file name. + + * net/tramp.el (tramp-handle-dired-uncache): When DIR is not a + directory, handle its directory component. + (tramp-handle-file-remote-p): Let-bind `tramp-verbose' to 3; this + function is called permanently and creates noise, otherwise. + + * net/tramp-imap.el (tramp-imap-handle-insert-directory): + * net/tramp-smb.el (tramp-smb-handle-insert-directory): + Handle the case, FILENAME is not in `default-directory'. (Bug#5478) + +2010-02-04 David Burger <dburger@google.com> (tiny change) + + * macros.el (apply-macro-to-region-lines): + Minor simplification. (Bug#5485) + +2010-02-04 Glenn Morris <rgm@gnu.org> + + * mail/rmail.el (rmail-show-message-1): Handle malformed + quoted-printable text. (Bug#5441) + + * mail/mail-utils.el (mail-unquote-printable-region): Doc fix. + + * simple.el (visual-line-mode): Capitalize lighter. + +2010-02-03 John Wiegley <jwiegley@gmail.com> + + * iswitchb.el (iswitchb-completions): Add bookmark files to the + list of files considered for "virtual buffer" completions. + +2010-02-03 Michael Albinus <michael.albinus@gmx.de> + + * net/ange-ftp.el (ange-ftp-insert-directory): Parse directory + also in case of (and (not full) (not wildcard)). This is needed, + when dired is called with a list of files, which are not in + `default-directory'. (Bug#5478) + +2010-02-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc-hooks.el (vc-path): Make it an obsolete var, rather than function. + +2010-02-02 Juri Linkov <juri@jurta.org> + + * textmodes/ispell.el (ispell-message-text-end): Remove final newline + from unidiff to allow function-line after @@. + +2010-02-02 Juri Linkov <juri@jurta.org> + + * ediff-util.el (ediff-file-checked-in-p): Replace '(nil CVS) by + '(RCS SCCS) with inverted condition. + +2010-02-02 Michael Albinus <michael.albinus@gmx.de> + + * net/ange-ftp.el (ange-ftp-skip-msgs): Ignore all ""^500 .*AUTH" + messages. + +2010-02-01 Juri Linkov <juri@jurta.org> + + * arc-mode.el (archive-zip-extract): Use `member-ignore-case' to + compare with "pkunzip" and "pkzip" instead of only "pkzip". + In the `archive-extract-by-stdout' branch use `shell-quote-argument' + only when (car archive-zip-extract) is "unzip". (Bug#5475) + +2010-02-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * doc-view.el (doc-view-new-window-function): Be a bit more defensive. + (doc-view-revert-buffer): New command. + (doc-view-mode-map): Use it. + +2010-02-01 Dan Nicolaescu <dann@ics.uci.edu> + + * vc-bzr.el (vc-bzr-dir-extra-headers): Add a header when a + pending merge is detected. + +2010-01-31 Juri Linkov <juri@jurta.org> + + * progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the + beginning of interactive spec like all other grep commands do. + Put "all" in front of "gz". (Bug#5260) + 2010-01-29 Dan Nicolaescu <dann@ics.uci.edu> * vc-bzr.el (vc-bzr-after-dir-status): Match another renaming indicator.
--- a/lisp/arc-mode.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/arc-mode.el Fri Feb 05 09:28:04 2010 -0500 @@ -1782,12 +1782,16 @@ (apply 'vector (nreverse files)))) (defun archive-zip-extract (archive name) - (if (equal (car archive-zip-extract) "pkzip") + (if (member-ignore-case (car archive-zip-extract) '("pkunzip" "pkzip")) (archive-*-extract archive name archive-zip-extract) - ;; unzip expands wildcards in NAME, so we need to quote it. - ;; FIXME: Does pkzip need similar treatment? - (archive-extract-by-stdout archive (shell-quote-argument name) - archive-zip-extract))) + (archive-extract-by-stdout + archive + ;; unzip expands wildcards in NAME, so we need to quote it. + ;; FIXME: Does pkunzip need similar treatment? + (if (equal (car archive-zip-extract) "unzip") + (shell-quote-argument name) + name) + archive-zip-extract))) (defun archive-zip-write-file-member (archive descr) (archive-*-write-file-member
--- a/lisp/dired.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/dired.el Fri Feb 05 09:28:04 2010 -0500 @@ -1144,8 +1144,12 @@ (setq mark-alist;; only after dired-remember-hidden since this unhides: (dired-remember-marks (point-min) (point-max))) ;; treat top level dir extra (it may contain wildcards) - (dired-uncache - (if (consp dired-directory) (car dired-directory) dired-directory)) + (if (not (consp dired-directory)) + (dired-uncache dired-directory) + (dired-uncache (car dired-directory)) + (dolist (dir (cdr dired-directory)) + (if (file-name-absolute-p dir) + (dired-uncache dir)))) ;; Run dired-after-readin-hook just once, below. (let ((dired-after-readin-hook nil)) (dired-readin)
--- a/lisp/doc-view.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/doc-view.el Fri Feb 05 09:28:04 2010 -0500 @@ -235,8 +235,15 @@ (defun doc-view-new-window-function (winprops) (let ((ol (image-mode-window-get 'overlay winprops))) + (when (and ol (not (overlay-buffer ol))) + ;; I've seen `ol' be a dead overlay. I do not yet know how this + ;; happened, so maybe the bug is elsewhere, but in the mean time, + ;; this seems like a safe approach. + (setq ol nil)) (if ol - (setq ol (copy-overlay ol)) + (progn + (assert (eq (overlay-buffer ol) (current-buffer))) + (setq ol (copy-overlay ol))) (assert (not (get-char-property (point-min) 'display))) (setq ol (make-overlay (point-min) (point-max) nil t)) (overlay-put ol 'doc-view t)) @@ -323,12 +330,21 @@ (define-key map (kbd "C-c C-c") 'doc-view-toggle-display) ;; Open a new buffer with doc's text contents (define-key map (kbd "C-c C-t") 'doc-view-open-text) - ;; Reconvert the current document - (define-key map (kbd "g") 'revert-buffer) - (define-key map (kbd "r") 'revert-buffer) + ;; Reconvert the current document. Don't just use revert-buffer + ;; because that resets the scale factor, the page number, ... + (define-key map (kbd "g") 'doc-view-revert-buffer) + (define-key map (kbd "r") 'doc-view-revert-buffer) map) "Keymap used by `doc-view-mode' when displaying a doc as a set of images.") +(defun doc-view-revert-buffer (&optional ignore-auto noconfirm) + "Like `revert-buffer', but preserves the buffer's current modes." + ;; FIXME: this should probably be moved to files.el and used for + ;; most/all "g" bindings to revert-buffer. + (interactive (list (not current-prefix-arg))) + (revert-buffer ignore-auto noconfirm 'preserve-modes)) + + (easy-menu-define doc-view-menu doc-view-mode-map "Menu for Doc View mode." '("DocView" @@ -367,10 +383,13 @@ (defmacro doc-view-current-image () `(image-mode-window-get 'image)) (defmacro doc-view-current-slice () `(image-mode-window-get 'slice)) +(defun doc-view-last-page-number () + (length doc-view-current-files)) + (defun doc-view-goto-page (page) "View the page given by PAGE." (interactive "nPage: ") - (let ((len (length doc-view-current-files)) + (let ((len (doc-view-last-page-number)) (hscroll (window-hscroll))) (if (< page 1) (setq page 1) @@ -410,12 +429,15 @@ ;; The PNG file hasn't been generated yet. (doc-view-pdf->png-1 doc-view-buffer-file-name file page (lexical-let ((page page) - (win (selected-window))) + (win (selected-window)) + (file file)) (lambda () (and (eq (current-buffer) (window-buffer win)) ;; If we changed page in the mean ;; time, don't mess things up. (eq (doc-view-current-page win) page) + ;; Make sure we don't infloop. + (file-readable-p file) (with-selected-window win (doc-view-goto-page page)))))))) (overlay-put (doc-view-current-overlay) @@ -439,7 +461,7 @@ (defun doc-view-last-page () "View the last page." (interactive) - (doc-view-goto-page (length doc-view-current-files))) + (doc-view-goto-page (doc-view-last-page-number))) (defun doc-view-scroll-up-or-next-page (&optional arg) "Scroll page up ARG lines if possible, else goto next page. @@ -512,7 +534,7 @@ (defun doc-view-kill-proc () "Kill the current converter process(es)." (interactive) - (while doc-view-current-converter-processes + (while (consp doc-view-current-converter-processes) (ignore-errors ;; Maybe it's dead already? (kill-process (pop doc-view-current-converter-processes)))) (when doc-view-current-timer @@ -622,7 +644,7 @@ (doc-view-kill-proc) ;; Clear the old cached files (when (file-exists-p (doc-view-current-cache-dir)) - (dired-delete-file (doc-view-current-cache-dir) 'always)) + (delete-directory (doc-view-current-cache-dir) 'recursive)) (doc-view-initiate-display)) (defun doc-view-sentinel (proc event) @@ -678,11 +700,18 @@ (list (format "-r%d" (round doc-view-resolution)) (concat "-sOutputFile=" png) pdf-ps)) - (lambda () - (when doc-view-current-timer - (cancel-timer doc-view-current-timer) - (setq doc-view-current-timer nil)) - (doc-view-display (current-buffer) 'force))) + (lexical-let ((resolution doc-view-resolution)) + (lambda () + ;; Only create the resolution file when it's all done, so it also + ;; serves as a witness that the conversion is complete. + (write-region (prin1-to-string resolution) nil + (expand-file-name "resolution.el" + (doc-view-current-cache-dir)) + nil 'silently) + (when doc-view-current-timer + (cancel-timer doc-view-current-timer) + (setq doc-view-current-timer nil)) + (doc-view-display (current-buffer) 'force)))) ;; Update the displayed pages as soon as they're done generating. (when doc-view-conversion-refresh-interval (setq doc-view-current-timer @@ -724,6 +753,13 @@ (doc-view-pdf->png pdf png rest) ;; Yippie, the important pages are done, update the display. (clear-image-cache) + ;; For the windows that have a message (like "Welcome to + ;; DocView") display property, clearing the image cache is + ;; not sufficient. + (dolist (win (get-buffer-window-list (current-buffer) nil 'visible)) + (with-selected-window win + (when (stringp (get-char-property (point-min) 'display)) + (doc-view-goto-page (doc-view-current-page))))) ;; Convert the rest of the pages. (doc-view-pdf/ps->png pdf png))))))) @@ -790,18 +826,8 @@ ;; resets during the redisplay). (setq doc-view-pending-cache-flush t) (let ((png-file (expand-file-name "page-%d.png" - (doc-view-current-cache-dir))) - (res-file (expand-file-name "resolution.el" (doc-view-current-cache-dir)))) (make-directory (doc-view-current-cache-dir) t) - ;; Save the used resolution so that it can be restored when - ;; reading the cached files. - (let ((res doc-view-resolution)) - (with-temp-buffer - (princ res (current-buffer)) - ;; Don't use write-file, so as to avoid prompts for `require-newline', - ;; or for pre-existing buffers with the same name, ... - (write-region nil nil res-file nil 'silently))) (case doc-view-doc-type (dvi ;; DVI files have to be converted to PDF before Ghostscript can process @@ -811,10 +837,10 @@ (png-file png-file)) (doc-view-dvi->pdf doc-view-buffer-file-name pdf (lambda () (doc-view-pdf/ps->png pdf png-file))))) - (pdf - (let ((pages (doc-view-active-pages))) - ;; Convert PDF to PNG images starting with the active pages. - (doc-view-pdf->png doc-view-buffer-file-name png-file pages))) + (pdf + (let ((pages (doc-view-active-pages))) + ;; Convert PDF to PNG images starting with the active pages. + (doc-view-pdf->png doc-view-buffer-file-name png-file pages))) (t ;; Convert to PNG images. (doc-view-pdf/ps->png doc-view-buffer-file-name png-file))))) @@ -1113,7 +1139,13 @@ (defun doc-view-already-converted-p () "Return non-nil if the current doc was already converted." (and (file-exists-p (doc-view-current-cache-dir)) - (> (length (directory-files (doc-view-current-cache-dir) nil "\\.png$")) 0))) + ;; Check that the resolution info is there, otherwise it means + ;; the conversion is incomplete. + (file-readable-p (expand-file-name "resolution.el" + (doc-view-current-cache-dir))) + (> (length (directory-files (doc-view-current-cache-dir) + nil "\\.png\\'")) + 0))) (defun doc-view-initiate-display () ;; Switch to image display if possible @@ -1125,14 +1157,14 @@ (progn (message "DocView: using cached files!") ;; Load the saved resolution - (let ((res-file (expand-file-name "resolution.el" - (doc-view-current-cache-dir))) - (res doc-view-resolution)) - (with-temp-buffer - (when (file-exists-p res-file) - (insert-file-contents res-file) - (setq res (read (current-buffer))))) - (when (numberp res) + (let* ((res-file (expand-file-name "resolution.el" + (doc-view-current-cache-dir))) + (res + (with-temp-buffer + (when (file-readable-p res-file) + (insert-file-contents res-file) + (read (current-buffer)))))) + (when (numberp res) (set (make-local-variable 'doc-view-resolution) res))) (doc-view-display (current-buffer) 'force)) (doc-view-convert-current-doc)) @@ -1266,7 +1298,7 @@ (set (make-local-variable 'mode-line-position) '(" P" (:eval (number-to-string (doc-view-current-page))) - "/" (:eval (number-to-string (length doc-view-current-files))))) + "/" (:eval (number-to-string (doc-view-last-page-number))))) ;; Don't scroll unless the user specifically asked for it. (set (make-local-variable 'auto-hscroll-mode) nil) (set (make-local-variable 'mwheel-scroll-up-function)
--- a/lisp/ediff-util.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/ediff-util.el Fri Feb 05 09:28:04 2010 -0500 @@ -1126,8 +1126,8 @@ (defun ediff-file-checked-in-p (file) (and (featurep 'vc-hooks) - ;; CVS files are considered not checked in - (not (memq (vc-backend file) '(nil CVS))) + ;; Only RCS and SCCS files are considered checked in + (memq (vc-backend file) '(RCS SCCS)) (if (fboundp 'vc-state) (and (not (memq (vc-state file) '(edited needs-merge)))
--- a/lisp/iswitchb.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/iswitchb.el Fri Feb 05 09:28:04 2010 -0500 @@ -1274,7 +1274,7 @@ ;; consult the list of past visited files, to see if we can find ;; the file which the user might thought was still open. (when (and iswitchb-use-virtual-buffers (null comps) - recentf-list) + (or recentf-list bookmark-alist)) (setq iswitchb-virtual-buffers nil) (let ((head recentf-list) name) (while head @@ -1289,15 +1289,30 @@ (setq iswitchb-virtual-buffers (cons (cons name (car head)) iswitchb-virtual-buffers))) - (setq head (cdr head))) - (setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers) - comps (mapcar 'car iswitchb-virtual-buffers)) + (setq head (cdr head)))) + (let ((head bookmark-alist) name path) + (while head + (if (and (setq path (cdr (assq 'filename (cdar head)))) + (setq name (file-name-nondirectory path)) + (string-match (if iswitchb-regexp + iswitchb-text + (regexp-quote iswitchb-text)) name) + (null (get-file-buffer path)) + (not (assoc name iswitchb-virtual-buffers)) + (not (iswitchb-ignore-buffername-p name)) + (file-exists-p path)) + (setq iswitchb-virtual-buffers + (cons (cons name path) + iswitchb-virtual-buffers))) + (setq head (cdr head)))) + (setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers) + comps (mapcar 'car iswitchb-virtual-buffers)) (let ((comp comps)) (while comp (put-text-property 0 (length (car comp)) 'face 'iswitchb-virtual-matches (car comp)) - (setq comp (cdr comp)))))) + (setq comp (cdr comp))))) (cond ((null comps) (format " %sNo match%s" open-bracket-determined
--- a/lisp/macros.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/macros.el Fri Feb 05 09:28:04 2010 -0500 @@ -273,7 +273,7 @@ (set-marker next-line-marker (point))) (save-excursion (let ((mark-active nil)) - (execute-kbd-macro (or macro last-kbd-macro))))) + (execute-kbd-macro macro)))) (set-marker end-marker nil) (set-marker next-line-marker nil))))
--- a/lisp/mail/mail-utils.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/mail/mail-utils.el Fri Feb 05 09:28:04 2010 -0500 @@ -123,13 +123,16 @@ (setq i (match-end 0))) (apply 'concat (nreverse (cons (substring string i) strings)))))) +;; FIXME Gnus for some reason has `quoted-printable-decode-region' in qp.el. ;;;###autoload (defun mail-unquote-printable-region (beg end &optional wrapper noerror unibyte) "Undo the \"quoted printable\" encoding in buffer from BEG to END. If the optional argument WRAPPER is non-nil, we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. -If NOERROR is non-nil, return t if successful. +On encountering malformed quoted-printable text, exits with an error, +unless NOERROR is non-nil, in which case it continues, and returns nil +when finished. Returns non-nil on successful completion. If UNIBYTE is non-nil, insert converted characters as unibyte. That is useful if you are going to character code decoding afterward, as Rmail does." @@ -246,6 +249,10 @@ "Prune addresses from DESTINATIONS, a list of recipient addresses. All addresses matching `rmail-dont-reply-to-names' are removed from the comma-separated list. The pruned list is returned." + ;; FIXME this (setting a user option the first time a command is used) + ;; is somewhat strange. Normally one would never set the option, + ;; but instead fall back to the default so long as it was nil. + ;; Or just set the default directly in the defcustom. (if (null rmail-dont-reply-to-names) (setq rmail-dont-reply-to-names (concat (if rmail-default-dont-reply-to-names
--- a/lisp/mail/rmail.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/mail/rmail.el Fri Feb 05 09:28:04 2010 -0500 @@ -2727,8 +2727,10 @@ (insert-buffer-substring mbox-buf body-start end) (cond ((string= character-coding "quoted-printable") - (mail-unquote-printable-region (point-min) (point-max) - nil nil 'unibyte)) + ;; See bug#5441. + (or (mail-unquote-printable-region (point-min) (point-max) + nil t 'unibyte) + (message "Malformed MIME quoted-printable message"))) ((and (string= character-coding "base64") is-text-message) (base64-decode-region (point-min) (point-max))) ((eq character-coding 'uuencode)
--- a/lisp/minibuffer.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/minibuffer.el Fri Feb 05 09:28:04 2010 -0500 @@ -2063,9 +2063,12 @@ ;; Complete /ums to /usr/monnier/src or lch to list-command-history. (defun completion-initials-expand (str table pred) - (unless (or (zerop (length str)) - (string-match completion-pcm--delim-wild-regex str)) - (let ((bounds (completion-boundaries str table pred ""))) + (let ((bounds (completion-boundaries str table pred ""))) + (unless (or (zerop (length str)) + ;; Only check within the boundaries, since the + ;; boundary char (e.g. /) might be in delim-regexp. + (string-match completion-pcm--delim-wild-regex str + (car bounds))) (if (zerop (car bounds)) (mapconcat 'string str "-") ;; If there's a boundary, it's trickier. The main use-case
--- a/lisp/net/ange-ftp.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/net/ange-ftp.el Fri Feb 05 09:28:04 2010 -0500 @@ -720,7 +720,7 @@ "^Connected \\|^$\\|^Remote system\\|^Using\\|^ \\|Password:\\|" "^Data connection \\|" "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|" - "^500 .*AUTH \\(KERBEROS\\|GSSAPI\\)\\|^KERBEROS\\|" + "^500 .*AUTH\\|^KERBEROS\\|" "^530 Please login with USER and PASS\\|" ; non kerberised vsFTPd "^534 Kerberos Authentication not enabled\\|" "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT") @@ -4533,9 +4533,10 @@ (when (string-match "-?d\\'" switches) ;; Remove "d" which dired added to `switches'. (setq switches (substring switches 0 (match-beginning 0)))) + (setq file (directory-file-name file)) (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") - switches nil)) - (filename (file-name-nondirectory (directory-file-name file))) + switches 'parse)) + (filename (file-name-nondirectory file)) (case-fold-search nil)) ;; FIXME: This presumes a particular output format, which is ;; basically Unix.
--- a/lisp/net/tramp-imap.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/net/tramp-imap.el Fri Feb 05 09:28:04 2010 -0500 @@ -395,9 +395,10 @@ (filename switches &optional wildcard full-directory-p) "Like `insert-directory' for Tramp files." (setq filename (expand-file-name filename)) - (when full-directory-p - ;; Called from `dired-add-entry'. - (setq filename (file-name-as-directory filename))) + (if full-directory-p + ;; Called from `dired-add-entry'. + (setq filename (file-name-as-directory filename)) + (setq filename (directory-file-name filename))) (with-parsed-tramp-file-name filename nil (save-match-data (let ((base (file-name-nondirectory localname)) @@ -472,14 +473,19 @@ (nth 6 x)))) ; date ;; For the file name, we set the `dired-filename' ;; property. This allows to handle file names with - ;; leading or trailing spaces as well. + ;; leading or trailing spaces as well. The inserted name + ;; could be from somewhere else, so we use the relative + ;; file name of `default-directory'. (let ((pos (point))) - (insert (format "%s" (nth 0 x))) ; file name - (put-text-property pos (point) 'dired-filename t)) - (insert "\n") + (insert + (format + "%s\n" + (file-relative-name + (expand-file-name (nth 0 x) (file-name-directory filename))))) + (put-text-property pos (1- (point)) 'dired-filename t)) (forward-line) (beginning-of-line))) - entries))))) + entries))))) (defun tramp-imap-handle-insert-file-contents (filename &optional visit beg end replace)
--- a/lisp/net/tramp-smb.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/net/tramp-smb.el Fri Feb 05 09:28:04 2010 -0500 @@ -651,9 +651,10 @@ (filename switches &optional wildcard full-directory-p) "Like `insert-directory' for Tramp files." (setq filename (expand-file-name filename)) - (when full-directory-p - ;; Called from `dired-add-entry'. - (setq filename (file-name-as-directory filename))) + (if full-directory-p + ;; Called from `dired-add-entry'. + (setq filename (file-name-as-directory filename)) + (setq filename (directory-file-name filename))) (with-parsed-tramp-file-name filename nil (save-match-data (let ((base (file-name-nondirectory filename)) @@ -715,8 +716,7 @@ (let ((attr (when (tramp-smb-get-stat-capability v) (ignore-errors - (file-attributes - (expand-file-name (nth 0 x)) 'string))))) + (file-attributes filename 'string))))) (insert (format "%10s %3d %-8s %-8s %8s %s " @@ -732,9 +732,16 @@ "%b %e %R" "%b %e %Y") (nth 3 x)))) ; date - ;; We mark the filename. + ;; We mark the file name. The inserted name could be + ;; from somewhere else, so we use the relative file + ;; name of `default-directory'. (let ((start (point))) - (insert (format "%s\n" (nth 0 x))) ; file name + (insert + (format + "%s\n" + (file-relative-name + (expand-file-name + (nth 0 x) (file-name-directory filename))))) (put-text-property start (1- (point)) 'dired-filename t)) (forward-line) (beginning-of-line))))
--- a/lisp/net/tramp.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/net/tramp.el Fri Feb 05 09:28:04 2010 -0500 @@ -4035,9 +4035,11 @@ (concat file ".z")) (t nil))))))))) -(defun tramp-handle-dired-uncache (dir) +(defun tramp-handle-dired-uncache (dir &optional dir-p) "Like `dired-uncache' for Tramp files." - (with-parsed-tramp-file-name dir nil + ;; DIR-P is valid for XEmacs only. + (with-parsed-tramp-file-name + (if (or dir-p (file-directory-p dir)) dir (file-name-directory dir)) nil (tramp-flush-file-property v localname))) ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm @@ -4663,20 +4665,21 @@ (defun tramp-handle-file-remote-p (filename &optional identification connected) "Like `file-remote-p' for Tramp files." - (when (tramp-tramp-file-p filename) - (let* ((v (tramp-dissect-file-name filename)) - (p (tramp-get-connection-process v)) - (c (and p (processp p) (memq (process-status p) '(run open))))) - ;; We expand the file name only, if there is already a connection. - (with-parsed-tramp-file-name - (if c (expand-file-name filename) filename) nil - (and (or (not connected) c) - (cond - ((eq identification 'method) method) - ((eq identification 'user) user) - ((eq identification 'host) host) - ((eq identification 'localname) localname) - (t (tramp-make-tramp-file-name method user host "")))))))) + (let ((tramp-verbose 3)) + (when (tramp-tramp-file-p filename) + (let* ((v (tramp-dissect-file-name filename)) + (p (tramp-get-connection-process v)) + (c (and p (processp p) (memq (process-status p) '(run open))))) + ;; We expand the file name only, if there is already a connection. + (with-parsed-tramp-file-name + (if c (expand-file-name filename) filename) nil + (and (or (not connected) c) + (cond + ((eq identification 'method) method) + ((eq identification 'user) user) + ((eq identification 'host) host) + ((eq identification 'localname) localname) + (t (tramp-make-tramp-file-name method user host ""))))))))) (defun tramp-find-file-name-coding-system-alist (filename tmpname) "Like `find-operation-coding-system' for Tramp filenames.
--- a/lisp/progmodes/cc-cmds.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/progmodes/cc-cmds.el Fri Feb 05 09:28:04 2010 -0500 @@ -1086,104 +1086,76 @@ (interactive "*P") (let ((c-echo-syntactic-information-p nil) - final-pos close-paren-inserted) + final-pos close-paren-inserted found-delim) (self-insert-command (prefix-numeric-value arg)) (setq final-pos (point)) - (c-save-buffer-state (c-parse-and-markup-<>-arglists - c-restricted-<>-arglists - <-pos) - - (when c-recognize-<>-arglists - (if (eq last-command-event ?<) - (when (and (progn - (backward-char) - (= (point) - (progn - (c-beginning-of-current-token) - (point)))) - (progn - (c-backward-token-2) - (looking-at c-opt-<>-sexp-key))) - (c-mark-<-as-paren (1- final-pos))) - - ;; It's a ">". Check if there's an earlier "<" which either has - ;; open paren syntax already or that can be recognized as an arglist - ;; together with this ">". Note that this won't work in cases like - ;; "template <x, a < b, y>" but they ought to be rare. - - (save-restriction - ;; Narrow to avoid that `c-forward-<>-arglist' below searches past - ;; our position. - (narrow-to-region (point-min) final-pos) - - (while (and - (progn - (goto-char final-pos) - (c-syntactic-skip-backward "^<;}" nil t) - (eq (char-before) ?<)) - (progn - (backward-char) - ;; If the "<" already got open paren syntax we know we - ;; have the matching closer. Handle it and exit the - ;; loop. - (if (looking-at "\\s\(") - (progn - (c-mark->-as-paren (1- final-pos)) - (setq close-paren-inserted t) - nil) - t)) - - (progn - (setq <-pos (point)) - (c-backward-syntactic-ws) - (c-simple-skip-symbol-backward)) - (or (looking-at c-opt-<>-sexp-key) - (not (looking-at c-keywords-regexp))) - - (let ((c-parse-and-markup-<>-arglists t) - c-restricted-<>-arglists - (containing-sexp - (c-most-enclosing-brace (c-parse-state)))) - (when (and containing-sexp - (progn (goto-char containing-sexp) - (eq (char-after) ?\()) - (not (eq (get-text-property (point) 'c-type) - 'c-decl-arg-start))) - (setq c-restricted-<>-arglists t)) - (goto-char <-pos) - (c-forward-<>-arglist nil)) - - ;; Loop here if the "<" we found above belongs to a nested - ;; angle bracket sexp. When we start over we'll find the - ;; previous or surrounding sexp. - (if (< (point) final-pos) - t - (setq close-paren-inserted t) - nil))))))) - (goto-char final-pos) +;;;; 2010-01-31: There used to be code here to put a syntax-table text +;;;; property on the new < or > and its mate (if any) when they are template +;;;; parens. This is now done in an after-change function. ;; Indent the line if appropriate. - (when (and c-electric-flag c-syntactic-indentation) - (backward-char) - (when (prog1 (or (looking-at "\\s\(\\|\\s\)") - (and (c-major-mode-is 'c++-mode) - (progn - (c-beginning-of-current-token) - (looking-at "<<\\|>>")) - (= (match-end 0) final-pos))) - (goto-char final-pos)) - (indent-according-to-mode))) - - (when (and close-paren-inserted - (not executing-kbd-macro) - blink-paren-function) - ;; Note: Most paren blink functions, such as the standard - ;; `blink-matching-open', currently doesn't handle paren chars - ;; marked with text properties very well. Maybe we should avoid - ;; this call for the time being? - (funcall blink-paren-function)))) + (when (and c-electric-flag c-syntactic-indentation c-recognize-<>-arglists) + (setq found-delim + (if (eq last-command-event ?<) + ;; If a <, basically see if it's got "template" before it ..... + (or (and (progn + (backward-char) + (= (point) + (progn (c-beginning-of-current-token) (point)))) + (progn + (c-backward-token-2) + (looking-at c-opt-<>-sexp-key))) + ;; ..... or is a C++ << operator. + (and (c-major-mode-is 'c++-mode) + (progn + (goto-char (1- final-pos)) + (c-beginning-of-current-token) + (looking-at "<<")) + (>= (match-end 0) final-pos))) + + ;; It's a >. Either a C++ >> operator. ...... + (or (and (c-major-mode-is 'c++-mode) + (progn + (goto-char (1- final-pos)) + (c-beginning-of-current-token) + (looking-at ">>")) + (>= (match-end 0) final-pos)) + ;; ...., or search back for a < which isn't already marked as an + ;; opening template delimiter. + (save-restriction + (widen) + ;; Narrow to avoid `c-forward-<>-arglist' below searching past + ;; our position. + (narrow-to-region (point-min) final-pos) + (goto-char final-pos) + (while + (and + (progn + (c-syntactic-skip-backward "^<;}" nil t) + (eq (char-before) ?<)) + (progn + (backward-char) + (looking-at "\\s\(")))) + (and (eq (char-after) ?<) + (not (looking-at "\\s\(")) + (progn (c-backward-syntactic-ws) + (c-simple-skip-symbol-backward)) + (or (looking-at c-opt-<>-sexp-key) + (not (looking-at c-keywords-regexp))))))))) + + (goto-char final-pos) + (when found-delim + (indent-according-to-mode) + (when (and (eq (char-before) ?>) + (not executing-kbd-macro) + blink-paren-function) + ;; Note: Most paren blink functions, such as the standard + ;; `blink-matching-open', currently doesn't handle paren chars + ;; marked with text properties very well. Maybe we should avoid + ;; this call for the time being? + (funcall blink-paren-function))))) (defun c-electric-paren (arg) "Insert a parenthesis.
--- a/lisp/progmodes/cc-defs.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/progmodes/cc-defs.el Fri Feb 05 09:28:04 2010 -0500 @@ -1029,6 +1029,44 @@ ;; Emacs. `(remove-text-properties ,from ,to '(,property nil)))) +(defmacro c-search-forward-char-property (property value &optional limit) + "Search forward for a text-property PROPERTY having value VALUE. +LIMIT bounds the search. The comparison is done with `equal'. + +Leave point just after the character, and set the match data on +this character, and return point. If VALUE isn't found, Return +nil; point is then left undefined." + `(let ((place (point))) + (while + (and + (< place ,(or limit '(point-max))) + (not (equal (get-text-property place ,property) ,value))) + (setq place (next-single-property-change + place ,property nil ,(or limit '(point-max))))) + (when (< place ,(or limit '(point-max))) + (goto-char place) + (search-forward-regexp ".") ; to set the match-data. + (point)))) + +(defmacro c-search-backward-char-property (property value &optional limit) + "Search backward for a text-property PROPERTY having value VALUE. +LIMIT bounds the search. The comparison is done with `equal'. + +Leave point just before the character, set the match data on this +character, and return point. If VALUE isn't found, Return nil; +point is then left undefined." + `(let ((place (point))) + (while + (and + (> place ,(or limit '(point-min))) + (not (equal (get-text-property (1- place) ,property) ,value))) + (setq place (previous-single-property-change + place ,property nil ,(or limit '(point-min))))) + (when (> place ,(or limit '(point-max))) + (goto-char place) + (search-backward-regexp ".") ; to set the match-data. + (point)))) + (defun c-clear-char-property-with-value-function (from to property value) "Remove all text-properties PROPERTY from the region (FROM, TO) which have the value VALUE, as tested by `equal'. These
--- a/lisp/progmodes/cc-engine.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/progmodes/cc-engine.el Fri Feb 05 09:28:04 2010 -0500 @@ -4880,7 +4880,168 @@ ))) -;; Handling of small scale constructs like types and names. +;; Setting and removing syntax properties on < and > in languages (C++ +;; and Java) where they can be template/generic delimiters as well as +;; their normal meaning of "less/greater than". + +;; Normally, < and > have syntax 'punctuation'. When they are found to +;; be delimiters, they are marked as such with the category properties +;; c-<-as-paren-syntax, c->-as-paren-syntax respectively. + +;; STRATEGY: +;; +;; It is impossible to determine with certainty whether a <..> pair in +;; C++ is two comparison operators or is template delimiters, unless +;; one duplicates a lot of a C++ compiler. For example, the following +;; code fragment: +;; +;; foo (a < b, c > d) ; +;; +;; could be a function call with two integer parameters (each a +;; relational expression), or it could be a constructor for class foo +;; taking one parameter d of templated type "a < b, c >". They are +;; somewhat easier to distinguish in Java. +;; +;; The strategy now (2010-01) adopted is to mark and unmark < and +;; > IN MATCHING PAIRS ONLY. [Previously, they were marked +;; individually when their context so indicated. This gave rise to +;; intractible problems when one of a matching pair was deleted, or +;; pulled into a literal.] +;; +;; At each buffer change, the syntax-table properties are removed in a +;; before-change function and reapplied, when needed, in an +;; after-change function. It is far more important that the +;; properties get removed when they they are spurious than that they +;; be present when wanted. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun c-clear-<-pair-props (&optional pos) + ;; POS (default point) is at a < character. If it is marked with + ;; open paren syntax-table text property, remove the property, + ;; together with the close paren property on the matching > (if + ;; any). + (save-excursion + (if pos + (goto-char pos) + (setq pos (point))) + (when (equal (c-get-char-property (point) 'syntax-table) + c-<-as-paren-syntax) + (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. + (c-go-list-forward)) + (when (equal (c-get-char-property (1- (point)) 'syntax-table) + c->-as-paren-syntax) ; should always be true. + (c-clear-char-property (1- (point)) 'syntax-table)) + (c-clear-char-property pos 'syntax-table)))) + +(defun c-clear->-pair-props (&optional pos) + ;; POS (default point) is at a > character. If it is marked with + ;; close paren syntax-table property, remove the property, together + ;; with the open paren property on the matching < (if any). + (save-excursion + (if pos + (goto-char pos) + (setq pos (point))) + (when (equal (c-get-char-property (point) 'syntax-table) + c->-as-paren-syntax) + (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. + (c-go-up-list-backward)) + (when (equal (c-get-char-property (point) 'syntax-table) + c-<-as-paren-syntax) ; should always be true. + (c-clear-char-property (point) 'syntax-table)) + (c-clear-char-property pos 'syntax-table)))) + +(defun c-clear-<>-pair-props (&optional pos) + ;; POS (default point) is at a < or > character. If it has an + ;; open/close paren syntax-table property, remove this property both + ;; from the current character and its partner (which will also be + ;; thusly marked). + (cond + ((eq (char-after) ?\<) + (c-clear-<-pair-props pos)) + ((eq (char-after) ?\>) + (c-clear->-pair-props pos)) + (t (c-benign-error + "c-clear-<>-pair-props called from wrong position")))) + +(defun c-clear-<-pair-props-if-match-after (lim &optional pos) + ;; POS (default point) is at a < character. If it is both marked + ;; with open/close paren syntax-table property, and has a matching > + ;; (also marked) which is after LIM, remove the property both from + ;; the current > and its partner. + (save-excursion + (if pos + (goto-char pos) + (setq pos (point))) + (when (equal (c-get-char-property (point) 'syntax-table) + c-<-as-paren-syntax) + (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. + (c-go-list-forward)) + (when (and (>= (point) lim) + (equal (c-get-char-property (1- (point)) 'syntax-table) + c->-as-paren-syntax)) ; should always be true. + (c-unmark-<->-as-paren (1- (point))) + (c-unmark-<->-as-paren pos))))) + +(defun c-clear->-pair-props-if-match-before (lim &optional pos) + ;; POS (default point) is at a > character. If it is both marked + ;; with open/close paren syntax-table property, and has a matching < + ;; (also marked) which is before LIM, remove the property both from + ;; the current < and its partner. + (save-excursion + (if pos + (goto-char pos) + (setq pos (point))) + (when (equal (c-get-char-property (point) 'syntax-table) + c->-as-paren-syntax) + (with-syntax-table c-no-parens-syntax-table ; ignore unbalanced [,{,(,.. + (c-go-up-list-backward)) + (when (and (<= (point) lim) + (equal (c-get-char-property (point) 'syntax-table) + c-<-as-paren-syntax)) ; should always be true. + (c-unmark-<->-as-paren (point)) + (c-unmark-<->-as-paren pos))))) + +(defun c-before-change-check-<>-operators (beg end) + ;; Unmark certain pairs of "< .... >" which are currently marked as + ;; template/generic delimiters. (This marking is via syntax-table + ;; text properties). + ;; + ;; These pairs are those which are in the current "statement" (i.e., + ;; the region between the {, }, or ; before BEG and the one after + ;; END), and which enclose any part of the interval (BEG END). + ;; + ;; Note that in C++ (?and Java), template/generic parens cannot + ;; enclose a brace or semicolon, so we use these as bounds on the + ;; region we must work on. + ;; + ;; This function is called from before-change-functions (via + ;; c-get-state-before-change-functions). Thus the buffer is widened, + ;; and point is undefined, both at entry and exit. + ;; + ;; FIXME!!! This routine ignores the possibility of macros entirely. + ;; 2010-01-29. + (save-excursion + (let ((beg-lit-limits (progn (goto-char beg) (c-literal-limits))) + (end-lit-limits (progn (goto-char end) (c-literal-limits)))) + ;; Locate the barrier before the changed region + (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) + (c-syntactic-skip-backward "^;{}" (max (- beg 2048) (point-min))) + + ;; Remove the syntax-table properties from each pertinent <...> pair. + ;; Firsly, the ones with the < before beg and > after beg. + (while (c-search-forward-char-property 'category 'c-<-as-paren-syntax beg) + (c-clear-<-pair-props-if-match-after beg (1- (point)))) + + ;; Locate the barrier after END. + (goto-char (if end-lit-limits (cdr end-lit-limits) end)) + (c-syntactic-re-search-forward "[;{}]" + (min (+ end 2048) (point-max)) 'end) + + ;; Remove syntax-table properties from the remaining pertinent <...> + ;; pairs, those with a > after end and < before end. + (while (c-search-backward-char-property 'category 'c->-as-paren-syntax end) + (c-clear->-pair-props-if-match-before end))))) + + (defun c-after-change-check-<>-operators (beg end) ;; This is called from `after-change-functions' when @@ -4902,7 +5063,7 @@ (< beg (setq beg (match-end 0)))) (while (progn (skip-chars-forward "^<>" beg) (< (point) beg)) - (c-clear-char-property (point) 'syntax-table) + (c-clear-<>-pair-props) (forward-char)))) (when (< beg end) @@ -4917,9 +5078,13 @@ (< end (setq end (match-end 0)))) (while (progn (skip-chars-forward "^<>" end) (< (point) end)) - (c-clear-char-property (point) 'syntax-table) + (c-clear-<>-pair-props) (forward-char))))))) + + +;; Handling of small scale constructs like types and names. + ;; Dynamically bound variable that instructs `c-forward-type' to also ;; treat possible types (i.e. those that it normally returns 'maybe or ;; 'found for) as actual types (and always return 'found for them).
--- a/lisp/progmodes/cc-langs.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/progmodes/cc-langs.el Fri Feb 05 09:28:04 2010 -0500 @@ -391,6 +391,27 @@ (and (c-lang-const c++-make-template-syntax-table) (funcall (c-lang-const c++-make-template-syntax-table)))) +(c-lang-defconst c-no-parens-syntax-table + ;; A variant of the standard syntax table which is used to find matching + ;; "<"s and ">"s which have been marked as parens using syntax table + ;; properties. The other paren characters (e.g. "{", ")" "]") are given a + ;; non-paren syntax here. so that the list commands will work on "< ... >" + ;; even when there's unbalanced other parens inside them. + ;; + ;; This variable is nil for languages which don't have template stuff. + t `(lambda () + (if (c-lang-const c-recognize-<>-arglists) + (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table)))) + (modify-syntax-entry ?\( "." table) + (modify-syntax-entry ?\) "." table) + (modify-syntax-entry ?\[ "." table) + (modify-syntax-entry ?\] "." table) + (modify-syntax-entry ?\{ "." table) + (modify-syntax-entry ?\} "." table) + table)))) +(c-lang-defvar c-no-parens-syntax-table + (funcall (c-lang-const c-no-parens-syntax-table))) + (c-lang-defconst c-identifier-syntax-modifications "A list that describes the modifications that should be done to the mode syntax table to get a syntax table that matches all identifiers @@ -423,26 +444,36 @@ classifies symbol constituents like '_' and '$' as word constituents, so that all identifiers are recognized as words.") -(c-lang-defconst c-get-state-before-change-function - "If non-nil, a function called from c-before-change-hook. -Typically it will record enough state to allow +(c-lang-defconst c-get-state-before-change-functions + ;; For documentation see the following c-lang-defvar of the same name. + ;; The value here may be a list of functions or a single function. + t nil + c++ '(c-extend-region-for-CPP c-before-change-check-<>-operators) + (c objc) 'c-extend-region-for-CPP + ;; java 'c-before-change-check-<>-operators + awk 'c-awk-record-region-clear-NL) +(c-lang-defvar c-get-state-before-change-functions + (let ((fs (c-lang-const c-get-state-before-change-functions))) + (if (listp fs) + fs + (list fs))) + "If non-nil, a list of functions called from c-before-change-hook. +Typically these will record enough state to allow `c-before-font-lock-function' to extend the region to fontify, and may do such things as removing text-properties which must be recalculated. -It takes 2 parameters, the BEG and END supplied to every +These functions will be run in the order given. Each of them +takes 2 parameters, the BEG and END supplied to every before-change function; on entry, the buffer will have been widened and match-data will have been saved; point is undefined on both entry and exit; the return value is ignored. -When the mode is initialized, this function is called with -parameters \(point-min) and \(point-max)." - t nil - (c c++ objc) 'c-extend-region-for-CPP - awk 'c-awk-record-region-clear-NL) -(c-lang-defvar c-get-state-before-change-function - (c-lang-const c-get-state-before-change-function)) - +The functions are called even when font locking isn't enabled. + +When the mode is initialized, the functions are called with +parameters \(point-min) and \(point-max).") + (c-lang-defconst c-before-font-lock-function "If non-nil, a function called just before font locking. Typically it will extend the region about to be fontified \(see
--- a/lisp/progmodes/cc-mode.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/progmodes/cc-mode.el Fri Feb 05 09:28:04 2010 -0500 @@ -641,8 +641,10 @@ (save-restriction (widen) (save-excursion - (if c-get-state-before-change-function - (funcall c-get-state-before-change-function (point-min) (point-max))) + (if c-get-state-before-change-functions + (mapc (lambda (fn) + (funcall fn beg end)) + c-get-state-before-change-functions)) (if c-before-font-lock-function (funcall c-before-font-lock-function (point-min) (point-max) (- (point-max) (point-min)))))) @@ -775,7 +777,7 @@ (defmacro c-run-mode-hooks (&rest hooks) ;; Emacs 21.1 has introduced a system with delayed mode hooks that - ;; require the use of the new function `run-mode-hooks'. + ;; requires the use of the new function `run-mode-hooks'. (if (cc-bytecomp-fboundp 'run-mode-hooks) `(run-mode-hooks ,@hooks) `(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks)))) @@ -808,8 +810,8 @@ ;; has already been widened, and match-data saved. The return value is ;; meaningless. ;; - ;; This function is the C/C++/ObjC value of - ;; `c-get-state-before-change-function' and is called exclusively as a + ;; This function is in the C/C++/ObjC values of + ;; `c-get-state-before-change-functions' and is called exclusively as a ;; before change function. (goto-char beg) (c-beginning-of-macro) @@ -922,8 +924,8 @@ ))))) (defun c-before-change (beg end) - ;; Function to be put on `before-change-function'. Primarily, this calls - ;; the language dependent `c-get-state-before-change-function'. It is + ;; Function to be put on `before-change-functions'. Primarily, this calls + ;; the language dependent `c-get-state-before-change-functions'. It is ;; otherwise used only to remove stale entries from the `c-found-types' ;; cache, and to record entries which a `c-after-change' function might ;; confirm as stale. @@ -1001,8 +1003,10 @@ ;; larger than (beg end). (setq c-new-BEG beg c-new-END end) - (if c-get-state-before-change-function - (funcall c-get-state-before-change-function beg end)) + (if c-get-state-before-change-functions + (mapc (lambda (fn) + (funcall fn beg end)) + c-get-state-before-change-functions)) )))) (defun c-after-change (beg end old-len)
--- a/lisp/progmodes/f90.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/progmodes/f90.el Fri Feb 05 09:28:04 2010 -0500 @@ -558,9 +558,8 @@ \\(function\\)\\>[ \t]*\\(\\sw+\\)[ \t]*\\(([^&!\n]*)\\)" (1 font-lock-type-face t) (4 font-lock-keyword-face t) (5 font-lock-function-name-face t) (6 'default t)) - ;; enum (F2003; cf type in -1). - '("\\<\\(enum\\)\\>\\([^()\n]*::\\)?[ \t]*\\(\\sw+\\)" - (1 font-lock-keyword-face) (3 font-lock-function-name-face)) + ;; enum (F2003; must be followed by ", bind(C)"). + '("\\<\\(enum\\)[ \t]*," (1 font-lock-keyword-face)) ;; end do, enum (F2003), if, select, where, and forall constructs. '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\)\\)\\>\ \\([ \t]+\\(\\sw+\\)\\)?"
--- a/lisp/progmodes/grep.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/progmodes/grep.el Fri Feb 05 09:28:04 2010 -0500 @@ -996,26 +996,34 @@ Like `rgrep' but uses `zgrep' for `grep-program', sets the default file name to `*.gz', and sets `grep-highlight-matches' to `always'." (interactive - (let ((grep-program "zgrep") - (grep-find-template nil) ; output of `grep-compute-defaults' - (grep-find-command nil) - (grep-host-defaults-alist nil) - (grep-files-aliases '(("*.gz" . "*.gz") ; for `grep-read-files' - ("all" . "* .*")))) - ;; Recompute defaults using let-bound values above. + (progn + ;; Compute standard default values. (grep-compute-defaults) - (cond - ((and grep-find-command (equal current-prefix-arg '(16))) - (list (read-from-minibuffer "Run: " grep-find-command - nil nil 'grep-find-history))) - ((not grep-find-template) - (error "grep.el: No `grep-find-template' available")) - (t (let* ((regexp (grep-read-regexp)) - (files (grep-read-files regexp)) - (dir (read-directory-name "Base directory: " - nil default-directory t)) - (confirm (equal current-prefix-arg '(4)))) - (list regexp files dir confirm grep-find-template)))))) + ;; Compute the default zrgrep command by running `grep-compute-defaults' + ;; for grep program "zgrep", but not changing global values. + (let ((grep-program "zgrep") + ;; Don't change global values for variables computed + ;; by `grep-compute-defaults'. + (grep-find-template nil) + (grep-find-command nil) + (grep-host-defaults-alist nil) + ;; Use for `grep-read-files' + (grep-files-aliases '(("all" . "* .*") + ("gz" . "*.gz")))) + ;; Recompute defaults using let-bound values above. + (grep-compute-defaults) + (cond + ((and grep-find-command (equal current-prefix-arg '(16))) + (list (read-from-minibuffer "Run: " grep-find-command + nil nil 'grep-find-history))) + ((not grep-find-template) + (error "grep.el: No `grep-find-template' available")) + (t (let* ((regexp (grep-read-regexp)) + (files (grep-read-files regexp)) + (dir (read-directory-name "Base directory: " + nil default-directory t)) + (confirm (equal current-prefix-arg '(4)))) + (list regexp files dir confirm grep-find-template))))))) ;; Set `grep-highlight-matches' to `always' ;; since `zgrep' puts filters in the grep output. (let ((grep-highlight-matches 'always))
--- a/lisp/simple.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/simple.el Fri Feb 05 09:28:04 2010 -0500 @@ -4700,7 +4700,7 @@ This also turns on `word-wrap' in the buffer." :keymap visual-line-mode-map :group 'visual-line - :lighter " wrap" + :lighter " Wrap" (if visual-line-mode (progn (set (make-local-variable 'visual-line--saved-state) nil)
--- a/lisp/startup.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/startup.el Fri Feb 05 09:28:04 2010 -0500 @@ -2103,7 +2103,7 @@ (when (string-match "\\`\\(--[^=]*\\)=" argi) (setq argval (substring argi (match-end 0)) argi (match-string 1 argi))) - (when (string-match "\\`--." orig-argi) + (when (string-match "\\`--?[^-]" orig-argi) (setq completion (try-completion argi longopts)) (if (eq completion t) (setq argi (substring argi 1))
--- a/lisp/textmodes/ispell.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/textmodes/ispell.el Fri Feb 05 09:28:04 2010 -0500 @@ -3459,7 +3459,7 @@ ;; Matches context difference listing "\\(\\(^cd .*\n\\)?diff -c .*\\)?\n\\*\\*\\* .*\n--- .*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*" ;; Matches unidiff difference listing - "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+ [-+][0-9]+,[0-9]+ @@\n" + "\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+ [-+][0-9]+,[0-9]+ @@" ;; Matches reporter.el bug report "^current state:\n==============\n" ;; Matches commonly used "cut" boundaries
--- a/lisp/vc-bzr.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/vc-bzr.el Fri Feb 05 09:28:04 2010 -0500 @@ -794,6 +794,12 @@ (buffer-string))) (shelve (vc-bzr-shelve-list)) (shelve-help-echo "Use M-x vc-bzr-shelve to create shelves") + (root-dir (vc-bzr-root dir)) + (pending-merge + (file-exists-p + (expand-file-name ".bzr/checkout/merge-hashes" root-dir))) + (pending-merge-help-echo + (format "A merge has been performed.\nA commit from the top-level directory (%s)\nis required before being able to check in anything else" root-dir)) (light-checkout (when (string-match ".+light checkout root: \\(.+\\)$" str) (match-string 1 str))) @@ -819,24 +825,32 @@ (propertize "Checkout of branch : " 'face 'font-lock-type-face) (propertize light-checkout-branch 'face 'font-lock-variable-name-face) "\n")) - (if shelve - (concat - (propertize "Shelves :\n" 'face 'font-lock-type-face - 'help-echo shelve-help-echo) - (mapconcat - (lambda (x) - (propertize x - 'face 'font-lock-variable-name-face - 'mouse-face 'highlight - 'help-echo "mouse-3: Show shelve menu\nP: Apply and remove shelf (pop)\nC-k: Delete shelf" - 'keymap vc-bzr-shelve-map)) - shelve "\n")) - (concat - (propertize "Shelves : " 'face 'font-lock-type-face - 'help-echo shelve-help-echo) - (propertize "No shelved changes" - 'help-echo shelve-help-echo - 'face 'font-lock-variable-name-face)))))) + (when pending-merge + (concat + (propertize "Warning : " 'face 'font-lock-warning-face + 'help-echo pending-merge-help-echo) + (propertize "Pending merges, commit recommended before any other action" + 'help-echo pending-merge-help-echo + 'face 'font-lock-warning-face) + "\n")) + (if shelve + (concat + (propertize "Shelves :\n" 'face 'font-lock-type-face + 'help-echo shelve-help-echo) + (mapconcat + (lambda (x) + (propertize x + 'face 'font-lock-variable-name-face + 'mouse-face 'highlight + 'help-echo "mouse-3: Show shelve menu\nA: Apply and keep shelf\nP: Apply and remove shelf (pop)\nS: Snapshot to a shelf\nC-k: Delete shelf" + 'keymap vc-bzr-shelve-map)) + shelve "\n")) + (concat + (propertize "Shelves : " 'face 'font-lock-type-face + 'help-echo shelve-help-echo) + (propertize "No shelved changes" + 'help-echo shelve-help-echo + 'face 'font-lock-variable-name-face)))))) (defun vc-bzr-shelve (name) "Create a shelve."
--- a/lisp/vc-hooks.el Sat Jan 30 10:20:14 2010 -0500 +++ b/lisp/vc-hooks.el Fri Feb 05 09:28:04 2010 -0500 @@ -89,7 +89,7 @@ :type '(repeat directory) :group 'vc) -(make-obsolete 'vc-path "should not be necessary anymore." "23.2") +(make-obsolete-variable 'vc-path "should not be necessary anymore." "23.2") (defcustom vc-make-backup-files nil "If non-nil, backups of registered files are made as with other files.
--- a/lwlib/README Sat Jan 30 10:20:14 2010 -0500 +++ b/lwlib/README Fri Feb 05 09:28:04 2010 -0500 @@ -4,6 +4,4 @@ GPL version 1 (or later). It is not considered part of GNU Emacs. This version of the library differs from the original as described in -the ChangeLog file. For example, the file "lwlib-int.h" was renamed -from "lwlib-internal.h" in order to fit in 14 characters, and the -makefile adjusted to fit in with Emacs's configure script. +the ChangeLog file.
--- a/src/ChangeLog Sat Jan 30 10:20:14 2010 -0500 +++ b/src/ChangeLog Fri Feb 05 09:28:04 2010 -0500 @@ -1,3 +1,28 @@ +2010-02-05 Chong Yidong <cyd@stupidchicken.com> + + * charset.c (load_charset_map_from_file): Allocate large + charset_map_entries structure on the heap rather than the stack. + (Bug#5526). + +2010-01-31 Kenichi Handa <handa@m17n.org> + + * font.c (font_parse_xlfd): If FONT is a font-entity and pixel + size in NAME is invalid, return -1 (Bug#5396). + +2010-01-31 Chong Yidong <cyd@stupidchicken.com> + + * nsterm.m (ns_defined_color): Block input. Suggested by Mike + <deactivated@gmail.com> (Bug#3605). + +2010-01-31 David De La Harpe Golden <david@harpegolden.net> + + * fileio.c (Frename_file): Correctly rename symlinks to + directories (Bug#5496). + +2010-01-31 Filipe Cabecinhas <filcab@gmail.com> (tiny change) + + * nsterm.m (ns_ring_bell): Handle visible bell like X. + 2010-01-30 Andreas Schwab <schwab@linux-m68k.org> * character.h (CHAR_PRINTABLE_P): Reparenthesize to avoid warning.
--- a/src/charset.c Sat Jan 30 10:20:14 2010 -0500 +++ b/src/charset.c Fri Feb 05 09:28:04 2010 -0500 @@ -526,7 +526,7 @@ error ("Failure in loading charset map: %S", SDATA (mapfile)); head = entries = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + xmalloc (sizeof (struct charset_map_entries))); n_entries = 0; eof = 0; while (1) @@ -563,6 +563,7 @@ close (fd); load_charset_map (charset, head, n_entries, control_flag); + xfree (head); } static void
--- a/src/config.in Sat Jan 30 10:20:14 2010 -0500 +++ b/src/config.in Fri Feb 05 09:28:04 2010 -0500 @@ -741,6 +741,9 @@ /* Define to 1 if you have the <utime.h> header file. */ #undef HAVE_UTIME_H +/* Define to 1 if you have the <utmp.h> header file. */ +#undef HAVE_UTMP_H + /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK
--- a/src/fileio.c Sat Jan 30 10:20:14 2010 -0500 +++ b/src/fileio.c Fri Feb 05 09:28:04 2010 -0500 @@ -2300,7 +2300,12 @@ count = SPECPDL_INDEX (); specbind (Qdelete_by_moving_to_trash, Qnil); - if (!NILP (Ffile_directory_p (file))) + + if (!NILP (Ffile_directory_p (file)) +#ifdef S_IFLNK + && NILP (symlink_target) +#endif + ) call2 (Qdelete_directory, file, Qt); else Fdelete_file (file);
--- a/src/font.c Sat Jan 30 10:20:14 2010 -0500 +++ b/src/font.c Fri Feb 05 09:28:04 2010 -0500 @@ -1122,6 +1122,8 @@ val = INTERN_FIELD (XLFD_PIXEL_INDEX); if (INTEGERP (val)) ASET (font, FONT_SIZE_INDEX, val); + else if (FONT_ENTITY_P (font)) + return -1; else { double point_size = -1;
--- a/src/nsterm.m Sat Jan 30 10:20:14 2010 -0500 +++ b/src/nsterm.m Fri Feb 05 09:28:04 2010 -0500 @@ -808,23 +808,58 @@ view = FRAME_NS_VIEW (frame); if (view != nil) { - NSRect r, surr; - NSPoint dim = NSMakePoint (128, 128); - - r = [view bounds]; - r.origin.x += (r.size.width - dim.x) / 2; - r.origin.y += (r.size.height - dim.y) / 2; - r.size.width = dim.x; - r.size.height = dim.y; - surr = NSInsetRect (r, -2, -2); - ns_focus (frame, &surr, 1); - [[view window] cacheImageInRect: [view convertRect: surr toView:nil]]; - [ns_lookup_indexed_color (NS_FACE_FOREGROUND - (FRAME_DEFAULT_FACE (frame)), frame) set]; - NSRectFill (r); + /* Get the bounds of our NSView */ + NSRect viewBounds = [view bounds]; + + /* Height of each line to flash. */ + int flash_height = FRAME_LINE_HEIGHT (frame); + int width = FRAME_PIXEL_WIDTH (frame) + - NS_SCROLL_BAR_WIDTH (frame); + + /* Get the GraphicsContext */ + CGContextRef ctxt = [[NSGraphicsContext currentContext] graphicsPort]; + CGRect lowerLine, upperLine; + lowerLine = + CGRectMake(viewBounds.origin.x, viewBounds.origin.y, + width + NS_SCROLL_BAR_WIDTH(frame), + flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame)); + upperLine = + CGRectMake(viewBounds.origin.x, + viewBounds.origin.y + viewBounds.size.height + - (flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame)), + width, + flash_height + FRAME_INTERNAL_BORDER_WIDTH (frame)); + + /* Invert the colors using a difference blend. */ + CGContextSetBlendMode(ctxt, kCGBlendModeDifference); + CGContextSetGrayFillColor(ctxt, 1, 1); + + /* If window is tall, flash top and bottom line. */ + if (viewBounds.size.height > 3 * FRAME_LINE_HEIGHT (frame)) + { + CGContextFillRect(ctxt, upperLine); + CGContextFillRect(ctxt, lowerLine); + } + else + /* If it is short, flash it all. */ + CGContextFillRect(ctxt, NSRectToCGRect([view bounds])); + + /* Bounce Dock icon. Maybe we can allow some configuration here. */ + [NSApp requestUserAttention: NSInformationalRequest]; + [[view window] flushWindow]; ns_timeout (150000); - [[view window] restoreCachedImage]; + + /* If window is tall, flash top and bottom line. */ + if (viewBounds.size.height > 3 * FRAME_LINE_HEIGHT (frame)) + { + CGContextFillRect(ctxt, upperLine); + CGContextFillRect(ctxt, lowerLine); + } + else + /* If it is short, flash it all. */ + CGContextFillRect(ctxt, NSRectToCGRect([view bounds])); + [[view window] flushWindow]; ns_unfocus (frame); } @@ -1517,19 +1552,19 @@ Return 0 if not found -------------------------------------------------------------------------- */ { - NSColor *temp; - int notFound = ns_get_color (name, &temp); - + NSColor *col; NSTRACE (ns_defined_color); - if (notFound) - return 0; - + BLOCK_INPUT; + if (ns_get_color (name, &col) != 0) /* Color not found */ + { + UNBLOCK_INPUT; + return 0; + } if (makeIndex && alloc) - color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */ - - ns_query_color (temp, color_def, !makeIndex); - + color_def->pixel = ns_index_color (col, f); + ns_query_color (col, color_def, !makeIndex); + UNBLOCK_INPUT; return 1; }