# HG changeset patch # User Kenichi Handa # Date 1265354066 -32400 # Node ID a10fe49a1405e3227b02ec8a0740443974e65cfa # Parent 67f557473da45468f3ad2f8fe2e166b13e111263# Parent ce00524a181d447e324dc0384bc279edbb93ab17 from trunk diff -r 67f557473da4 -r a10fe49a1405 admin/notes/bugtracker --- a/admin/notes/bugtracker Tue Feb 02 13:15:15 2010 +0900 +++ b/admin/notes/bugtracker Fri Feb 05 16:14:26 2010 +0900 @@ -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, diff -r 67f557473da4 -r a10fe49a1405 lisp/ChangeLog --- a/lisp/ChangeLog Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/ChangeLog Fri Feb 05 16:14:26 2010 +0900 @@ -1,3 +1,114 @@ +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. + (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. + (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 + + * 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 (tiny change) + + * macros.el (apply-macro-to-region-lines): + Minor simplification. (Bug#5485) + +2010-02-04 Glenn Morris + + * 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 + + * iswitchb.el (iswitchb-completions): Add bookmark files to the + list of files considered for "virtual buffer" completions. + +2010-02-03 Michael Albinus + + * 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 + + * vc-hooks.el (vc-path): Make it an obsolete var, rather than function. + +2010-02-02 Juri Linkov + + * textmodes/ispell.el (ispell-message-text-end): Remove final newline + from unidiff to allow function-line after @@. + +2010-02-02 Juri Linkov + + * ediff-util.el (ediff-file-checked-in-p): Replace '(nil CVS) by + '(RCS SCCS) with inverted condition. + +2010-02-02 Michael Albinus + + * net/ange-ftp.el (ange-ftp-skip-msgs): Ignore all ""^500 .*AUTH" + messages. + 2010-02-01 Juri Linkov * arc-mode.el (archive-zip-extract): Use `member-ignore-case' to diff -r 67f557473da4 -r a10fe49a1405 lisp/dired.el --- a/lisp/dired.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/dired.el Fri Feb 05 16:14:26 2010 +0900 @@ -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) diff -r 67f557473da4 -r a10fe49a1405 lisp/doc-view.el --- a/lisp/doc-view.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/doc-view.el Fri Feb 05 16:14:26 2010 +0900 @@ -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))))) @@ -1129,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 @@ -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 67f557473da4 -r a10fe49a1405 lisp/ediff-util.el --- a/lisp/ediff-util.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/ediff-util.el Fri Feb 05 16:14:26 2010 +0900 @@ -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))) diff -r 67f557473da4 -r a10fe49a1405 lisp/iswitchb.el --- a/lisp/iswitchb.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/iswitchb.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 diff -r 67f557473da4 -r a10fe49a1405 lisp/macros.el --- a/lisp/macros.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/macros.el Fri Feb 05 16:14:26 2010 +0900 @@ -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)))) diff -r 67f557473da4 -r a10fe49a1405 lisp/mail/mail-utils.el --- a/lisp/mail/mail-utils.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/mail/mail-utils.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 diff -r 67f557473da4 -r a10fe49a1405 lisp/mail/rmail.el --- a/lisp/mail/rmail.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/mail/rmail.el Fri Feb 05 16:14:26 2010 +0900 @@ -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) diff -r 67f557473da4 -r a10fe49a1405 lisp/minibuffer.el --- a/lisp/minibuffer.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/minibuffer.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 67f557473da4 -r a10fe49a1405 lisp/net/ange-ftp.el --- a/lisp/net/ange-ftp.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/net/ange-ftp.el Fri Feb 05 16:14:26 2010 +0900 @@ -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") @@ -4534,7 +4534,7 @@ ;; Remove "d" which dired added to `switches'. (setq switches (substring switches 0 (match-beginning 0)))) (let* ((dirlist (ange-ftp-ls (or (file-name-directory file) ".") - switches nil)) + switches 'parse)) (filename (file-name-nondirectory (directory-file-name file))) (case-fold-search nil)) ;; FIXME: This presumes a particular output format, which is diff -r 67f557473da4 -r a10fe49a1405 lisp/net/tramp-imap.el --- a/lisp/net/tramp-imap.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/net/tramp-imap.el Fri Feb 05 16:14:26 2010 +0900 @@ -472,14 +472,18 @@ (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) 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) diff -r 67f557473da4 -r a10fe49a1405 lisp/net/tramp-smb.el --- a/lisp/net/tramp-smb.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/net/tramp-smb.el Fri Feb 05 16:14:26 2010 +0900 @@ -716,7 +716,7 @@ (when (tramp-smb-get-stat-capability v) (ignore-errors (file-attributes - (expand-file-name (nth 0 x)) 'string))))) + (expand-file-name (nth 0 x) filename) 'string))))) (insert (format "%10s %3d %-8s %-8s %8s %s " @@ -732,9 +732,14 @@ "%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) filename)))) (put-text-property start (1- (point)) 'dired-filename t)) (forward-line) (beginning-of-line)))) diff -r 67f557473da4 -r a10fe49a1405 lisp/net/tramp.el --- a/lisp/net/tramp.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/net/tramp.el Fri Feb 05 16:14:26 2010 +0900 @@ -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. diff -r 67f557473da4 -r a10fe49a1405 lisp/progmodes/cc-cmds.el --- a/lisp/progmodes/cc-cmds.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/progmodes/cc-cmds.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 " 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. diff -r 67f557473da4 -r a10fe49a1405 lisp/progmodes/cc-defs.el --- a/lisp/progmodes/cc-defs.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/progmodes/cc-defs.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 diff -r 67f557473da4 -r a10fe49a1405 lisp/progmodes/cc-engine.el --- a/lisp/progmodes/cc-engine.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/progmodes/cc-engine.el Fri Feb 05 16:14:26 2010 +0900 @@ -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). diff -r 67f557473da4 -r a10fe49a1405 lisp/progmodes/cc-langs.el --- a/lisp/progmodes/cc-langs.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/progmodes/cc-langs.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 diff -r 67f557473da4 -r a10fe49a1405 lisp/progmodes/cc-mode.el --- a/lisp/progmodes/cc-mode.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/progmodes/cc-mode.el Fri Feb 05 16:14:26 2010 +0900 @@ -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) diff -r 67f557473da4 -r a10fe49a1405 lisp/simple.el --- a/lisp/simple.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/simple.el Fri Feb 05 16:14:26 2010 +0900 @@ -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) diff -r 67f557473da4 -r a10fe49a1405 lisp/startup.el --- a/lisp/startup.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/startup.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 67f557473da4 -r a10fe49a1405 lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/textmodes/ispell.el Fri Feb 05 16:14:26 2010 +0900 @@ -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 diff -r 67f557473da4 -r a10fe49a1405 lisp/vc-hooks.el --- a/lisp/vc-hooks.el Tue Feb 02 13:15:15 2010 +0900 +++ b/lisp/vc-hooks.el Fri Feb 05 16:14:26 2010 +0900 @@ -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. diff -r 67f557473da4 -r a10fe49a1405 lwlib/README --- a/lwlib/README Tue Feb 02 13:15:15 2010 +0900 +++ b/lwlib/README Fri Feb 05 16:14:26 2010 +0900 @@ -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. diff -r 67f557473da4 -r a10fe49a1405 nt/inc/grp.h diff -r 67f557473da4 -r a10fe49a1405 src/ChangeLog --- a/src/ChangeLog Tue Feb 02 13:15:15 2010 +0900 +++ b/src/ChangeLog Fri Feb 05 16:14:26 2010 +0900 @@ -1,3 +1,9 @@ +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 67f557473da4 -r a10fe49a1405 src/charset.c --- a/src/charset.c Tue Feb 02 13:15:15 2010 +0900 +++ b/src/charset.c Fri Feb 05 16:14:26 2010 +0900 @@ -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