# HG changeset patch # User Katsumi Yamaoka # Date 1265580708 0 # Node ID 019a6c1574b4fbe41e1e28d25b4cf04497a07356 # Parent af8dcc16162ff8f9350ffdecbfcb6db5dc3006af# Parent 906017fe8f4bfbf72e41e5d2b8417fa410147fdf Merge from mainline. diff -r af8dcc16162f -r 019a6c1574b4 doc/misc/ChangeLog --- a/doc/misc/ChangeLog Thu Feb 04 22:04:56 2010 +0000 +++ b/doc/misc/ChangeLog Sun Feb 07 22:11:48 2010 +0000 @@ -1,3 +1,7 @@ +2010-02-05 Mark A. Hershberger + + * ede.texi, eieio.texi, semantic.texi: Use standard direntry format. + 2010-01-21 Katsumi Yamaoka * gnus.texi (Score File Format): Fix typo. diff -r af8dcc16162f -r 019a6c1574b4 doc/misc/ede.texi --- a/doc/misc/ede.texi Thu Feb 04 22:04:56 2010 +0000 +++ b/doc/misc/ede.texi Sun Feb 07 22:11:48 2010 +0000 @@ -22,13 +22,10 @@ @end quotation @end copying -@ifinfo -@format -START-INFO-DIR-ENTRY +@dircategory Emacs +@direntry * ede: (ede). Project management for Emacs -END-INFO-DIR-ENTRY -@end format -@end ifinfo +@end direntry @titlepage @center @titlefont{EDE (The Emacs Development Environment)} diff -r af8dcc16162f -r 019a6c1574b4 doc/misc/eieio.texi --- a/doc/misc/eieio.texi Thu Feb 04 22:04:56 2010 +0000 +++ b/doc/misc/eieio.texi Sun Feb 07 22:11:48 2010 +0000 @@ -27,13 +27,10 @@ @end quotation @end copying -@ifinfo -@format -START-INFO-DIR-ENTRY +@dircategory Emacs +@direntry * eieio: (eieio). Objects for Emacs -END-INFO-DIR-ENTRY -@end format -@end ifinfo +@end direntry @titlepage @center @titlefont{@value{TITLE}} diff -r af8dcc16162f -r 019a6c1574b4 doc/misc/semantic.texi --- a/doc/misc/semantic.texi Thu Feb 04 22:04:56 2010 +0000 +++ b/doc/misc/semantic.texi Sun Feb 07 22:11:48 2010 +0000 @@ -41,13 +41,10 @@ @end quotation @end copying -@ifinfo -@format -START-INFO-DIR-ENTRY +@dircategory Emacs +@direntry * Semantic: (semantic). Source code parser library and utilities. -END-INFO-DIR-ENTRY -@end format -@end ifinfo +@end direntry @titlepage @center @titlefont{Semantic} diff -r af8dcc16162f -r 019a6c1574b4 lisp/ChangeLog --- a/lisp/ChangeLog Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/ChangeLog Sun Feb 07 22:11:48 2010 +0000 @@ -1,10 +1,91 @@ +2010-02-07 Glenn Morris + + * progmodes/f90.el (f90-font-lock-keywords-1, f90-font-lock-keywords-2): + Move F2003 named interfaces from keywords-2 to keywords-1, and + use function-name-face rather than constant-face. + Simplify "abstract interface" regexp. + +2010-02-07 Chong Yidong + + * eshell/esh-util.el (eshell-file-attributes): New optional arg + ID-FORMAT. Pass it to `file-attributes'. + + * eshell/em-ls.el (eshell-do-ls): Use it (Bug#5528). + +2010-02-07 sj (tiny change) + + * faces.el (set-face-attribute): Allow calling + internal-set-lisp-face-attribute with 'unspecified family and + foundry argument (Bug#5536). + +2010-02-07 Glenn Morris + + * progmodes/f90.el (f90-font-lock-keywords-2) + (f90-looking-at-type-like, f90-looking-at-program-block-end): + Handle F2003 named interfaces. + +2010-02-06 Chong Yidong + + * progmodes/cc-mode.el (c-common-init): Bind temporary variables + beg and end before calling c-get-state-before-change-functions. + +2010-02-06 Dan Nicolaescu + + * vc-bzr.el (vc-bzr-dir-extra-headers): Disable the pending merges header. + +2010-02-05 Juri Linkov + + * doc-view.el (doc-view-mode): + * image-mode.el (image-mode): Put property mode-class=special. + (Bug#4896) + +2010-02-05 Mark A. Hershberger + + * vc-svn.el (vc-svn-revision-table): New function. + +2010-02-05 Michael Albinus + + * 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 + + * progmodes/f90.el (f90-font-lock-keywords-2): Fix `enum'. + +2010-02-05 Chong Yidong + + * startup.el (command-line-1): Convert options beginning with a + single dash as well (Bug#5519). + +2010-02-05 Stefan Monnier + + 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 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. + * 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). @@ -16,7 +97,7 @@ * 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-before-change-check-<>-operators): New functions. (c-after-change-check-<>-operators): Use macro c-unmark-<->-as-paren. diff -r af8dcc16162f -r 019a6c1574b4 lisp/doc-view.el --- a/lisp/doc-view.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/doc-view.el Sun Feb 07 22:11:48 2010 +0000 @@ -383,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) @@ -426,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) @@ -455,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. @@ -528,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 @@ -638,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) @@ -694,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 @@ -740,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))))))) @@ -806,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 @@ -827,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))))) @@ -1124,12 +1134,18 @@ ;;;; User interface commands and the mode -;; (put 'doc-view-mode 'mode-class 'special) +(put 'doc-view-mode 'mode-class 'special) (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 @@ -1141,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)) @@ -1282,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) diff -r af8dcc16162f -r 019a6c1574b4 lisp/erc/ChangeLog --- a/lisp/erc/ChangeLog Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/erc/ChangeLog Sun Feb 07 22:11:48 2010 +0000 @@ -1,3 +1,7 @@ +2010-02-07 Vivek Dasmohapatra + + * erc-services.el (erc-nickserv-alist): Fix defcustom type (Bug#5520). + 2010-01-25 Vivek Dasmohapatra * erc-backend.el (erc-session-connector): New var. diff -r af8dcc16162f -r 019a6c1574b4 lisp/erc/erc-services.el --- a/lisp/erc/erc-services.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/erc/erc-services.el Sun Feb 07 22:11:48 2010 +0000 @@ -303,7 +303,11 @@ (boolean :tag "Use current nick in identify message?") (choice :tag "Command to use (optional)" (string :tag "Command") - (const :tag "No special command necessary" nil))))) + (const :tag "No special command necessary" nil)) + (choice :tag "Detect Success" + (regexp :tag "Pattern to match") + (const :tag "Do not try to detect success" nil))))) + (defsubst erc-nickserv-alist-sender (network &optional entry) (nth 1 (or entry (assoc network erc-nickserv-alist)))) diff -r af8dcc16162f -r 019a6c1574b4 lisp/eshell/em-ls.el --- a/lisp/eshell/em-ls.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/eshell/em-ls.el Sun Feb 07 22:11:48 2010 +0000 @@ -393,13 +393,13 @@ (eshell-glob-regexp ignore-pattern)))) ;; list the files! (eshell-ls-entries - (mapcar (function - (lambda (arg) - (cons (if (and (eshell-under-windows-p) - (file-name-absolute-p arg)) - (expand-file-name arg) - arg) - (eshell-file-attributes arg)))) + (mapcar (lambda (arg) + (cons (if (and (eshell-under-windows-p) + (file-name-absolute-p arg)) + (expand-file-name arg) + arg) + (eshell-file-attributes + arg (if numeric-uid-gid 'integer 'string)))) args) t (expand-file-name default-directory))) (funcall flush-func))) @@ -710,7 +710,7 @@ (funcall insert-func need-return "\n")))))) (defun eshell-ls-entries (entries &optional separate root-dir) - "Output PATH's directory ENTRIES, formatted according to OPTIONS. + "Output PATH's directory ENTRIES. Each member of ENTRIES may either be a string or a cons cell, the car of which is the file name, and the cdr of which is the list of attributes. diff -r af8dcc16162f -r 019a6c1574b4 lisp/eshell/esh-util.el --- a/lisp/eshell/esh-util.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/eshell/esh-util.el Sun Feb 07 22:11:48 2010 +0000 @@ -701,8 +701,11 @@ (forward-line))) entry)) -(defun eshell-file-attributes (file) - "Return the attributes of FILE, playing tricks if it's over ange-ftp." +(defun eshell-file-attributes (file &optional id-format) + "Return the attributes of FILE, playing tricks if it's over ange-ftp. +The optional argument ID-FORMAT specifies the preferred uid and +gid format. Valid values are 'string and 'integer, defaulting to +'integer. See `file-attributes'." (let* ((file (expand-file-name file)) entry) (if (string-equal (file-remote-p file 'method) "ftp") @@ -723,7 +726,7 @@ (setq entry (cdr fentry)) (setq entry nil))))) entry) - (file-attributes file)))) + (file-attributes file id-format)))) (defalias 'eshell-copy-tree 'copy-tree) diff -r af8dcc16162f -r 019a6c1574b4 lisp/faces.el --- a/lisp/faces.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/faces.el Sun Feb 07 22:11:48 2010 +0000 @@ -735,10 +735,10 @@ (unless foundry (setq foundry (match-string 1 family))) (setq family (match-string 2 family))) - (when (stringp family) + (when (or (stringp family) (eq family 'unspecified)) (internal-set-lisp-face-attribute face :family (purecopy family) where)) - (when (stringp foundry) + (when (or (stringp foundry) (eq foundry 'unspecified)) (internal-set-lisp-face-attribute face :foundry (purecopy foundry) where))) (while args diff -r af8dcc16162f -r 019a6c1574b4 lisp/image-mode.el --- a/lisp/image-mode.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/image-mode.el Sun Feb 07 22:11:48 2010 +0000 @@ -317,6 +317,8 @@ (defvar bookmark-make-record-function) +(put 'image-mode 'mode-class 'special) + ;;;###autoload (defun image-mode () "Major mode for image files. diff -r af8dcc16162f -r 019a6c1574b4 lisp/minibuffer.el --- a/lisp/minibuffer.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/minibuffer.el Sun Feb 07 22:11:48 2010 +0000 @@ -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 diff -r af8dcc16162f -r 019a6c1574b4 lisp/net/ange-ftp.el --- a/lisp/net/ange-ftp.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/net/ange-ftp.el Sun Feb 07 22:11:48 2010 +0000 @@ -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 'parse)) - (filename (file-name-nondirectory (directory-file-name file))) + (filename (file-name-nondirectory file)) (case-fold-search nil)) ;; FIXME: This presumes a particular output format, which is ;; basically Unix. diff -r af8dcc16162f -r 019a6c1574b4 lisp/net/tramp-imap.el --- a/lisp/net/tramp-imap.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/net/tramp-imap.el Sun Feb 07 22:11:48 2010 +0000 @@ -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)) @@ -479,7 +480,8 @@ (insert (format "%s\n" - (file-relative-name (expand-file-name (nth 0 x) filename)))) + (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))) diff -r af8dcc16162f -r 019a6c1574b4 lisp/net/tramp-smb.el --- a/lisp/net/tramp-smb.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/net/tramp-smb.el Sun Feb 07 22:11:48 2010 +0000 @@ -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) filename) 'string))))) + (file-attributes filename 'string))))) (insert (format "%10s %3d %-8s %-8s %8s %s " @@ -739,7 +739,9 @@ (insert (format "%s\n" - (file-relative-name (expand-file-name (nth 0 x) filename)))) + (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)))) diff -r af8dcc16162f -r 019a6c1574b4 lisp/progmodes/cc-mode.el --- a/lisp/progmodes/cc-mode.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/progmodes/cc-mode.el Sun Feb 07 22:11:48 2010 +0000 @@ -642,9 +642,11 @@ (widen) (save-excursion (if c-get-state-before-change-functions - (mapc (lambda (fn) - (funcall fn beg end)) - c-get-state-before-change-functions)) + (let ((beg (point-min)) + (end (point-max))) + (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)))))) diff -r af8dcc16162f -r 019a6c1574b4 lisp/progmodes/f90.el --- a/lisp/progmodes/f90.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/progmodes/f90.el Sun Feb 07 22:11:48 2010 +0000 @@ -158,10 +158,8 @@ ;; 3. Support for align. ;; Font-locking: ;; 1. OpenMP, OpenMPI?, preprocessor highlighting. -;; 2. interface blah - Highlight "blah" in function-name face? -;; Need to avoid "interface operator (+)" etc. -;; 3. integer_name = 1 -;; 4. Labels for "else" statements (F2003)? +;; 2. integer_name = 1 +;; 3. Labels for "else" statements (F2003)? (defvar comment-auto-fill-only-comments) (defvar font-lock-keywords) @@ -467,22 +465,21 @@ ;;; (1 font-lock-keyword-face) (3 font-lock-function-name-face)) '(f90-typedef-matcher (1 font-lock-keyword-face) (2 font-lock-function-name-face)) - ;; Other functions and declarations. + ;; F2003. Prevent operators being highlighted as functions. + '("\\<\\(\\(?:end[ \t]*\\)?interface[ \t]*\\(?:assignment\\|operator\\|\ +read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t)) + ;; Other functions and declarations. Named interfaces = F2003. '("\\<\\(\\(?:end[ \t]*\\)?\\(program\\|module\\|function\\|associate\\|\ -subroutine\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?" +subroutine\\|interface\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) ;; F2003. '("\\<\\(use\\)[ \t]*,[ \t]*\\(\\(?:non_\\)?intrinsic\\)[ \t]*::[ \t]*\ \\(\\sw+\\)" (1 font-lock-keyword-face) (2 font-lock-keyword-face) (3 font-lock-function-name-face)) - "\\<\\(\\(end[ \t]*\\)?block[ \t]*data\\|contains\\|\ -end[ \t]*interface\\)\\>" - ;; "abstract interface" is F2003. Must come after previous entry. - '("\\<\\(\\(?:abstract[ \t]*\\)?interface\\)\\>" - ;; [ \t]*\\(\\(\\sw+\\)[ \t]*[^(]\\)?" - ;; (2) messes up "interface operator ()", etc. - (1 font-lock-keyword-face))) ;(2 font-lock-function-name-face nil t))) + "\\<\\(\\(end[ \t]*\\)?block[ \t]*data\\|contains\\)\\>" + ;; "abstract interface" is F2003. + '("\\" (0 font-lock-keyword-face t))) "This does fairly subdued highlighting of comments and function calls.") ;; NB not explicitly handling this, yet it seems to work. @@ -558,9 +555,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+\\)\\)?" @@ -1230,7 +1226,7 @@ (defsubst f90-looking-at-type-like () "Return (KIND NAME) if a type/enum/interface/block-data starts after point. -NAME is non-nil only for type." +NAME is non-nil only for type and certain interfaces." (cond ((save-excursion (and (looking-at "\\[ \t]*") @@ -1243,7 +1239,15 @@ ;;; ((and (not (looking-at f90-typeis-re)) ;;; (looking-at f90-type-def-re)) ;;; (list (match-string 1) (match-string 2))) - ((looking-at "\\(enum\\|interface\\|block[ \t]*data\\)\\>") + ((looking-at "\\<\\(interface\\)\\>[ \t]*") + (list (match-string 1) + (save-excursion + (goto-char (match-end 0)) + (if (or (looking-at "\\(operator\\|assignment\\|read\\|\ +write\\)[ \t]*([^)\n]*)") + (looking-at "\\sw+")) + (match-string 0))))) + ((looking-at "\\(enum\\|block[ \t]*data\\)\\>") (list (match-string 1) nil)) ((looking-at "abstract[ \t]*\\(interface\\)\\>") (list (match-string 1) nil)))) @@ -1271,9 +1275,12 @@ (defsubst f90-looking-at-program-block-end () "Return (KIND NAME) if a block with name NAME ends after point." - (if (looking-at (concat "end[ \t]*" f90-blocks-re - "?\\([ \t]+\\(\\sw+\\)\\)?\\>")) - (list (match-string 1) (match-string 3)))) + (cond ((looking-at "end[ \t]*\\(interface\\)[ \t]*\\(\ +\\(?:assignment\\|operator\\|read\\|write\\)[ \t]*([^)\n]*)\\)") + (list (match-string 1) (match-string 2))) + ((looking-at (concat "end[ \t]*" f90-blocks-re + "?\\([ \t]+\\(\\sw+\\)\\)?\\>")) + (list (match-string 1) (match-string 3))))) (defsubst f90-comment-indent () "Return the indentation to be used for a comment starting at point. diff -r af8dcc16162f -r 019a6c1574b4 lisp/startup.el --- a/lisp/startup.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/startup.el Sun Feb 07 22:11:48 2010 +0000 @@ -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)) diff -r af8dcc16162f -r 019a6c1574b4 lisp/vc-bzr.el --- a/lisp/vc-bzr.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/vc-bzr.el Sun Feb 07 22:11:48 2010 +0000 @@ -796,8 +796,12 @@ (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))) + ;; FIXME: looking for .bzr/checkout/merge-hashes is not a + ;; reliable method to detect pending merges, disable this + ;; until a proper solution is implemented. + (and nil + (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 diff -r af8dcc16162f -r 019a6c1574b4 lisp/vc-svn.el --- a/lisp/vc-svn.el Thu Feb 04 22:04:56 2010 +0000 +++ b/lisp/vc-svn.el Sun Feb 07 22:11:48 2010 +0000 @@ -31,6 +31,10 @@ (eval-when-compile (require 'vc)) +;; Clear up the cache to force vc-call to check again and discover +;; new functions when we reload this file. +(put 'SVN 'vc-functions nil) + ;;; ;;; Customization options ;;; @@ -722,6 +726,21 @@ (beginning-of-line) (if (looking-at vc-svn-annotate-re) (match-string 1)))) +(defun vc-svn-revision-table (files) + (let ((vc-svn-revisions '())) + (with-current-buffer "*vc*" + (vc-svn-command nil 0 files "log" "-q") + (goto-char (point-min)) + (forward-line) + (let ((start (point-min)) + (loglines (buffer-substring-no-properties (point-min) + (point-max)))) + (while (string-match "^r\\([0-9]+\\) " loglines) + (push (match-string 1 loglines) vc-svn-revisions) + (setq start (+ start (match-end 0))) + (setq loglines (buffer-substring-no-properties start (point-max))))) + vc-svn-revisions))) + (provide 'vc-svn) ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d diff -r af8dcc16162f -r 019a6c1574b4 src/ChangeLog --- a/src/ChangeLog Thu Feb 04 22:04:56 2010 +0000 +++ b/src/ChangeLog Sun Feb 07 22:11:48 2010 +0000 @@ -1,3 +1,15 @@ +2010-02-06 Chong Yidong + + * charset.c (load_charset_map_from_file) + (load_charset_map_from_vector): Fix last change to use SAFE_ALLOCA + instead of xmalloc (Bug#5526). Suggested by Vivek Dasmohapatra. + +2010-02-05 Chong Yidong + + * 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 * font.c (font_parse_xlfd): If FONT is a font-entity and pixel diff -r af8dcc16162f -r 019a6c1574b4 src/charset.c --- a/src/charset.c Thu Feb 04 22:04:56 2010 +0000 +++ b/src/charset.c Sun Feb 07 22:11:48 2010 +0000 @@ -512,12 +512,13 @@ int eof; Lisp_Object suffixes; struct charset_map_entries *head, *entries; - int n_entries; - int count = SPECPDL_INDEX (); + int n_entries, count; + USE_SAFE_ALLOCA; suffixes = Fcons (build_string (".map"), Fcons (build_string (".TXT"), Qnil)); + count = SPECPDL_INDEX (); specbind (Qfile_name_handler_alist, Qnil); fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil); unbind_to (count, Qnil); @@ -525,8 +526,12 @@ || ! (fp = fdopen (fd, "r"))) error ("Failure in loading charset map: %S", SDATA (mapfile)); - head = entries = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + /* Use SAFE_ALLOCA instead of alloca, as `charset_map_entries' is + large (larger than MAX_ALLOCA). */ + SAFE_ALLOCA (head, struct charset_map_entries *, + sizeof (struct charset_map_entries)); + entries = head; + n_entries = 0; eof = 0; while (1) @@ -549,8 +554,8 @@ if (n_entries > 0 && (n_entries % 0x10000) == 0) { - entries->next = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + SAFE_ALLOCA (entries->next, struct charset_map_entries *, + sizeof (struct charset_map_entries)); entries = entries->next; } idx = n_entries % 0x10000; @@ -563,6 +568,7 @@ close (fd); load_charset_map (charset, head, n_entries, control_flag); + SAFE_FREE (); } static void @@ -577,6 +583,7 @@ int n_entries; int len = ASIZE (vec); int i; + USE_SAFE_ALLOCA; if (len % 2 == 1) { @@ -584,8 +591,12 @@ return; } - head = entries = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + /* Use SAFE_ALLOCA instead of alloca, as `charset_map_entries' is + large (larger than MAX_ALLOCA). */ + SAFE_ALLOCA (head, struct charset_map_entries *, + sizeof (struct charset_map_entries)); + entries = head; + n_entries = 0; for (i = 0; i < len; i += 2) { @@ -618,8 +629,8 @@ if (n_entries > 0 && (n_entries % 0x10000) == 0) { - entries->next = ((struct charset_map_entries *) - alloca (sizeof (struct charset_map_entries))); + SAFE_ALLOCA (entries->next, struct charset_map_entries *, + sizeof (struct charset_map_entries)); entries = entries->next; } idx = n_entries % 0x10000; @@ -630,6 +641,7 @@ } load_charset_map (charset, head, n_entries, control_flag); + SAFE_FREE (); }