diff options
| author | Paul Eggert | 2011-04-28 09:11:49 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-28 09:11:49 -0700 |
| commit | 49b14d65c3f6b0a981ca032c6801d2c39ab1591a (patch) | |
| tree | a8f2453f845c0f3846e42388b566caf25cf8bd81 | |
| parent | ede49d7153ed628078bcbc2473f898904b5250ea (diff) | |
| parent | d1bb66232235211a8383356ef2851f68ac864a3f (diff) | |
| download | emacs-49b14d65c3f6b0a981ca032c6801d2c39ab1591a.tar.gz emacs-49b14d65c3f6b0a981ca032c6801d2c39ab1591a.zip | |
Merge from mainline.
| -rw-r--r-- | lisp/mh-e/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/mh-e/mh-alias.el | 32 | ||||
| -rw-r--r-- | lisp/mh-e/mh-e.el | 2 | ||||
| -rw-r--r-- | lisp/mh-e/mh-letter.el | 82 | ||||
| -rw-r--r-- | lisp/mh-e/mh-utils.el | 28 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 8 | ||||
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/doprnt.c | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 12 |
9 files changed, 127 insertions, 65 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index f8e94412836..5228dc86fa2 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2011-04-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * mh-utils.el (mh-folder-completion-function): Make it work like | ||
| 4 | file-name completion, so partial-completion can do its job. | ||
| 5 | |||
| 6 | * mh-letter.el (mh-letter-completion-at-point): New function, extracted | ||
| 7 | from mh-letter-complete | ||
| 8 | (mh-letter-mode, mh-letter-complete, mh-letter-complete-or-space): | ||
| 9 | Use it. | ||
| 10 | (mh-complete-word): Only use the common-substring arg when it works. | ||
| 11 | (mh-folder-expand-at-point): | ||
| 12 | * mh-alias.el (mh-alias-letter-expand-alias): Return data suitable for | ||
| 13 | completion-at-point-functions. | ||
| 14 | |||
| 1 | 2011-04-06 Juanma Barranquero <lekktu@gmail.com> | 15 | 2011-04-06 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 16 | ||
| 3 | * mh-funcs.el (mh-undo-folder): Accept and ignore arguments, | 17 | * mh-funcs.el (mh-undo-folder): Accept and ignore arguments, |
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 061a5b3dc94..449a8782d0c 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el | |||
| @@ -296,16 +296,28 @@ Blind aliases or users from /etc/passwd are not expanded." | |||
| 296 | (defun mh-alias-letter-expand-alias () | 296 | (defun mh-alias-letter-expand-alias () |
| 297 | "Expand mail alias before point." | 297 | "Expand mail alias before point." |
| 298 | (mh-alias-reload-maybe) | 298 | (mh-alias-reload-maybe) |
| 299 | (let* ((end (point)) | 299 | (let* ((begin (mh-beginning-of-word)) |
| 300 | (begin (mh-beginning-of-word)) | 300 | (end (save-excursion |
| 301 | (input (buffer-substring-no-properties begin end))) | 301 | (goto-char begin) |
| 302 | (mh-complete-word input mh-alias-alist begin end) | 302 | (mh-beginning-of-word -1)))) |
| 303 | (when mh-alias-expand-aliases-flag | 303 | (when (>= end (point)) |
| 304 | (let* ((end (point)) | 304 | (list |
| 305 | (expansion (mh-alias-expand (buffer-substring begin end)))) | 305 | begin (if (fboundp 'completion-at-point) end (point)) |
| 306 | (delete-region begin end) | 306 | (if (not mh-alias-expand-aliases-flag) |
| 307 | (insert expansion))))) | 307 | mh-alias-alist |
| 308 | 308 | (lambda (string pred action) | |
| 309 | (case action | ||
| 310 | ((nil) | ||
| 311 | (let ((res (try-completion string mh-alias-alist pred))) | ||
| 312 | (if (or (eq res t) | ||
| 313 | (and (stringp res) | ||
| 314 | (eq t (try-completion res mh-alias-alist pred)))) | ||
| 315 | (or (mh-alias-expand (if (stringp res) res string)) | ||
| 316 | res) | ||
| 317 | res))) | ||
| 318 | ((t) (all-completions string mh-alias-alist pred)) | ||
| 319 | ((lambda) (if (fboundp 'test-completion) | ||
| 320 | (test-completion string mh-alias-alist pred)))))))))) | ||
| 309 | 321 | ||
| 310 | 322 | ||
| 311 | ;;; Alias File Updating | 323 | ;;; Alias File Updating |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index e9896eb4b8c..ccae063827f 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -1179,7 +1179,7 @@ lowercase for mailing lists and uppercase for people." | |||
| 1179 | "*Non-nil means to expand aliases entered in the minibuffer. | 1179 | "*Non-nil means to expand aliases entered in the minibuffer. |
| 1180 | 1180 | ||
| 1181 | In other words, aliases entered in the minibuffer will be | 1181 | In other words, aliases entered in the minibuffer will be |
| 1182 | expanded to the full address in the message draft. By default, | 1182 | expanded to the full address in the message draft. By default, |
| 1183 | this expansion is not performed." | 1183 | this expansion is not performed." |
| 1184 | :type 'boolean | 1184 | :type 'boolean |
| 1185 | :group 'mh-alias | 1185 | :group 'mh-alias |
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index eebc30aa4ca..2ced886c05e 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el | |||
| @@ -185,7 +185,7 @@ semi-obsolete and is only used if `mail-citation-hook' is nil.") | |||
| 185 | "\C-c\C-w" mh-check-whom | 185 | "\C-c\C-w" mh-check-whom |
| 186 | "\C-c\C-y" mh-yank-cur-msg | 186 | "\C-c\C-y" mh-yank-cur-msg |
| 187 | "\C-c\M-d" mh-insert-auto-fields | 187 | "\C-c\M-d" mh-insert-auto-fields |
| 188 | "\M-\t" mh-letter-complete | 188 | "\M-\t" mh-letter-complete ;; FIXME: completion-at-point |
| 189 | "\t" mh-letter-next-header-field-or-indent | 189 | "\t" mh-letter-next-header-field-or-indent |
| 190 | [backtab] mh-letter-previous-header-field) | 190 | [backtab] mh-letter-previous-header-field) |
| 191 | 191 | ||
| @@ -346,6 +346,8 @@ order). | |||
| 346 | (define-key mh-letter-mode-map [menu-bar mail] 'undefined) | 346 | (define-key mh-letter-mode-map [menu-bar mail] 'undefined) |
| 347 | (mh-do-in-xemacs (easy-menu-remove mail-menubar-menu)) | 347 | (mh-do-in-xemacs (easy-menu-remove mail-menubar-menu)) |
| 348 | (setq fill-column mh-letter-fill-column) | 348 | (setq fill-column mh-letter-fill-column) |
| 349 | (add-hook 'completion-at-point-functions | ||
| 350 | 'mh-letter-completion-at-point nil 'local) | ||
| 349 | ;; If text-mode-hook turned on auto-fill, tune it for messages | 351 | ;; If text-mode-hook turned on auto-fill, tune it for messages |
| 350 | (when auto-fill-function | 352 | (when auto-fill-function |
| 351 | (make-local-variable 'auto-fill-function) | 353 | (make-local-variable 'auto-fill-function) |
| @@ -488,24 +490,38 @@ In a program, you can pass in a signature FILE." | |||
| 488 | (message "No signature found"))))) | 490 | (message "No signature found"))))) |
| 489 | (force-mode-line-update)) | 491 | (force-mode-line-update)) |
| 490 | 492 | ||
| 491 | (defun mh-letter-complete (arg) | 493 | (defun mh-letter-completion-at-point () |
| 492 | "Perform completion on header field or word preceding point. | 494 | "Return the completion data at point for MH letters. |
| 495 | This provides alias and folder completion in header fields according to | ||
| 496 | `mh-letter-complete-function-alist' and falls back on | ||
| 497 | `mh-letter-complete-function-alist' elsewhere." | ||
| 498 | (let ((func (and (mh-in-header-p) | ||
| 499 | (cdr (assoc (mh-letter-header-field-at-point) | ||
| 500 | mh-letter-complete-function-alist))))) | ||
| 501 | (if func | ||
| 502 | (or (funcall func) #'ignore) | ||
| 503 | mh-letter-complete-function))) | ||
| 504 | |||
| 505 | (defalias 'mh-letter-complete | ||
| 506 | (if (fboundp 'completion-at-point) #'completion-at-point | ||
| 507 | (lambda () | ||
| 508 | "Perform completion on header field or word preceding point. | ||
| 493 | 509 | ||
| 494 | If the field contains addresses (for example, \"To:\" or \"Cc:\") | 510 | If the field contains addresses (for example, \"To:\" or \"Cc:\") |
| 495 | or folders (for example, \"Fcc:\") then this command will provide | 511 | or folders (for example, \"Fcc:\") then this command will provide |
| 496 | alias completion. In the body of the message, this command runs | 512 | alias completion. In the body of the message, this command runs |
| 497 | `mh-letter-complete-function' instead, which is set to | 513 | `mh-letter-complete-function' instead, which is set to |
| 498 | `ispell-complete-word' by default. This command takes a prefix | 514 | `ispell-complete-word' by default." |
| 499 | argument ARG that is passed to the | 515 | (interactive) |
| 500 | `mh-letter-complete-function'." | 516 | (let ((data (mh-letter-completion-at-point))) |
| 501 | (interactive "P") | 517 | (cond |
| 502 | (let ((func nil)) | 518 | ((functionp data) (funcall data)) |
| 503 | (cond ((not (mh-in-header-p)) | 519 | ((consp data) |
| 504 | (funcall mh-letter-complete-function arg)) | 520 | (let ((start (nth 0 data)) |
| 505 | ((setq func (cdr (assoc (mh-letter-header-field-at-point) | 521 | (end (nth 1 data)) |
| 506 | mh-letter-complete-function-alist))) | 522 | (table (nth 2 data))) |
| 507 | (funcall func)) | 523 | (mh-complete-word (buffer-substring-no-properties start end) |
| 508 | (t (funcall mh-letter-complete-function arg))))) | 524 | table start end)))))))) |
| 509 | 525 | ||
| 510 | (defun mh-letter-complete-or-space (arg) | 526 | (defun mh-letter-complete-or-space (arg) |
| 511 | "Perform completion or insert space. | 527 | "Perform completion or insert space. |
| @@ -521,11 +537,12 @@ one space." | |||
| 521 | (mh-beginning-of-word -1)))) | 537 | (mh-beginning-of-word -1)))) |
| 522 | (cond ((not mh-compose-space-does-completion-flag) | 538 | (cond ((not mh-compose-space-does-completion-flag) |
| 523 | (self-insert-command arg)) | 539 | (self-insert-command arg)) |
| 524 | ((not (mh-in-header-p)) (self-insert-command arg)) | 540 | ;; FIXME: This > test is redundant now that all the completion |
| 541 | ;; functions do it anyway. | ||
| 525 | ((> (point) end-of-prev) (self-insert-command arg)) | 542 | ((> (point) end-of-prev) (self-insert-command arg)) |
| 526 | ((setq func (cdr (assoc (mh-letter-header-field-at-point) | 543 | ((let ((mh-letter-complete-function nil)) |
| 527 | mh-letter-complete-function-alist))) | 544 | (mh-letter-completion-at-point)) |
| 528 | (funcall func)) | 545 | (mh-letter-complete)) |
| 529 | (t (self-insert-command arg))))) | 546 | (t (self-insert-command arg))))) |
| 530 | 547 | ||
| 531 | (defun mh-letter-confirm-address () | 548 | (defun mh-letter-confirm-address () |
| @@ -862,18 +879,17 @@ downcasing the field name." | |||
| 862 | 879 | ||
| 863 | (defun mh-folder-expand-at-point () | 880 | (defun mh-folder-expand-at-point () |
| 864 | "Do folder name completion in Fcc header field." | 881 | "Do folder name completion in Fcc header field." |
| 865 | (let* ((end (point)) | 882 | (let* ((beg (mh-beginning-of-word)) |
| 866 | (beg (mh-beginning-of-word)) | 883 | (end (save-excursion |
| 867 | (folder (buffer-substring-no-properties beg end)) | 884 | (goto-char beg) |
| 868 | (leading-plus (and (> (length folder) 0) (equal (aref folder 0) ?+))) | 885 | (mh-beginning-of-word -1)))) |
| 869 | (choices (mapcar (lambda (x) (list x)) | 886 | (when (>= end (point)) |
| 870 | (mh-folder-completion-function folder nil t)))) | 887 | (list beg (if (fboundp 'completion-at-point) end (point)) |
| 871 | (unless leading-plus | 888 | #'mh-folder-completion-function)))) |
| 872 | (setq folder (concat "+" folder))) | ||
| 873 | (mh-complete-word folder choices beg end))) | ||
| 874 | 889 | ||
| 875 | ;;;###mh-autoload | 890 | ;;;###mh-autoload |
| 876 | (defun mh-complete-word (word choices begin end) | 891 | (defun mh-complete-word (word choices begin end) |
| 892 | ;; FIXME: Only needed when completion-at-point doesn't exist. | ||
| 877 | "Complete WORD from CHOICES. | 893 | "Complete WORD from CHOICES. |
| 878 | Any match found replaces the text from BEGIN to END." | 894 | Any match found replaces the text from BEGIN to END." |
| 879 | (let ((completion (try-completion word choices)) | 895 | (let ((completion (try-completion word choices)) |
| @@ -889,8 +905,16 @@ Any match found replaces the text from BEGIN to END." | |||
| 889 | ((stringp completion) | 905 | ((stringp completion) |
| 890 | (if (equal word completion) | 906 | (if (equal word completion) |
| 891 | (with-output-to-temp-buffer completions-buffer | 907 | (with-output-to-temp-buffer completions-buffer |
| 892 | (mh-display-completion-list (all-completions word choices) | 908 | (mh-display-completion-list |
| 893 | word)) | 909 | (all-completions word choices) |
| 910 | ;; The `common-subtring' arg only works if it's a prefix. | ||
| 911 | (unless (and (functionp choices) | ||
| 912 | (let ((bounds | ||
| 913 | (funcall choices | ||
| 914 | word nil '(boundaries . "")))) | ||
| 915 | (and (eq 'boundaries (car-safe bounds)) | ||
| 916 | (< 0 (cadr bounds))))) | ||
| 917 | word))) | ||
| 894 | (ignore-errors | 918 | (ignore-errors |
| 895 | (kill-buffer completions-buffer)) | 919 | (kill-buffer completions-buffer)) |
| 896 | (delete-region begin end) | 920 | (delete-region begin end) |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index d7d3107b908..4394e1b1b22 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -596,6 +596,7 @@ Expects FOLDER to have already been normalized with | |||
| 596 | (setq name (substring name 0 (1- (length name))))) | 596 | (setq name (substring name 0 (1- (length name))))) |
| 597 | (push | 597 | (push |
| 598 | (cons name | 598 | (cons name |
| 599 | ;; FIXME: what is this used for? --Stef | ||
| 599 | (search-forward "(others)" (mh-line-end-position) t)) | 600 | (search-forward "(others)" (mh-line-end-position) t)) |
| 600 | results)))) | 601 | results)))) |
| 601 | (forward-line 1)))) | 602 | (forward-line 1)))) |
| @@ -702,32 +703,33 @@ See Info node `(elisp) Programmed Completion' for details." | |||
| 702 | (remainder (cond (last-complete (substring name (1+ last-slash))) | 703 | (remainder (cond (last-complete (substring name (1+ last-slash))) |
| 703 | (name (substring name 1)) | 704 | (name (substring name 1)) |
| 704 | (t "")))) | 705 | (t "")))) |
| 705 | (cond ((eq flag nil) | 706 | (cond ((eq (car-safe flag) 'boundaries) |
| 707 | (list* 'boundaries | ||
| 708 | (let ((slash (mh-search-from-end ?/ orig-name))) | ||
| 709 | (if slash (1+ slash) | ||
| 710 | (if (string-match "\\`\\+" orig-name) 1 0))) | ||
| 711 | (if (cdr flag) (string-match "/" (cdr flag))))) | ||
| 712 | ((eq flag nil) | ||
| 706 | (let ((try-res | 713 | (let ((try-res |
| 707 | (try-completion | 714 | (try-completion |
| 708 | name | 715 | remainder |
| 709 | (mapcar (lambda (x) | 716 | (mh-sub-folders last-complete t) |
| 710 | (cons (concat (or last-complete "+") (car x)) | ||
| 711 | (cdr x))) | ||
| 712 | (mh-sub-folders last-complete t)) | ||
| 713 | predicate))) | 717 | predicate))) |
| 714 | (cond ((eq try-res nil) nil) | 718 | (cond ((eq try-res nil) nil) |
| 715 | ((and (eq try-res t) (equal name orig-name)) t) | 719 | ((and (eq try-res t) (equal name orig-name)) t) |
| 716 | ((eq try-res t) name) | 720 | ((eq try-res t) name) |
| 717 | (t try-res)))) | 721 | (t (concat (or last-complete "+") try-res))))) |
| 718 | ((eq flag t) | 722 | ((eq flag t) |
| 719 | (mapcar (lambda (x) | 723 | (all-completions |
| 720 | (concat (or last-complete "+") x)) | 724 | remainder (mh-sub-folders last-complete t) predicate)) |
| 721 | (all-completions | ||
| 722 | remainder (mh-sub-folders last-complete t) predicate))) | ||
| 723 | ((eq flag 'lambda) | 725 | ((eq flag 'lambda) |
| 724 | (let ((path (concat (unless (and (> (length name) 1) | 726 | (let ((path (concat (unless (and (> (length name) 1) |
| 725 | (eq (aref name 1) ?/)) | 727 | (eq (aref name 1) ?/)) |
| 726 | mh-user-path) | 728 | mh-user-path) |
| 727 | (substring name 1)))) | 729 | (substring name 1)))) |
| 728 | (cond (mh-allow-root-folder-flag (file-exists-p path)) | 730 | (cond (mh-allow-root-folder-flag (file-directory-p path)) |
| 729 | ((equal path mh-user-path) nil) | 731 | ((equal path mh-user-path) nil) |
| 730 | (t (file-exists-p path)))))))) | 732 | (t (file-directory-p path)))))))) |
| 731 | 733 | ||
| 732 | ;; Shush compiler. | 734 | ;; Shush compiler. |
| 733 | (defvar completion-root-regexp) ; XEmacs | 735 | (defvar completion-root-regexp) ; XEmacs |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 4bf06a45238..7bd256afc79 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1377,6 +1377,10 @@ Currently supported properties are: | |||
| 1377 | "List of well-behaved functions found on `completion-at-point-functions'.") | 1377 | "List of well-behaved functions found on `completion-at-point-functions'.") |
| 1378 | 1378 | ||
| 1379 | (defun completion--capf-wrapper (fun which) | 1379 | (defun completion--capf-wrapper (fun which) |
| 1380 | ;; FIXME: The safe/misbehave handling assumes that a given function will | ||
| 1381 | ;; always return the same kind of data, but this breaks down with functions | ||
| 1382 | ;; like comint-completion-at-point or mh-letter-completion-at-point, which | ||
| 1383 | ;; could be sometimes safe and sometimes misbehaving (and sometimes neither). | ||
| 1380 | (if (case which | 1384 | (if (case which |
| 1381 | (all t) | 1385 | (all t) |
| 1382 | (safe (member fun completion--capf-safe-funs)) | 1386 | (safe (member fun completion--capf-safe-funs)) |
| @@ -1408,7 +1412,7 @@ The completion method is determined by `completion-at-point-functions'." | |||
| 1408 | (completion-in-region-mode-predicate | 1412 | (completion-in-region-mode-predicate |
| 1409 | (lambda () | 1413 | (lambda () |
| 1410 | ;; We're still in the same completion field. | 1414 | ;; We're still in the same completion field. |
| 1411 | (eq (car (funcall hookfun)) start)))) | 1415 | (eq (car-safe (funcall hookfun)) start)))) |
| 1412 | (completion-in-region start end collection | 1416 | (completion-in-region start end collection |
| 1413 | (plist-get plist :predicate)))) | 1417 | (plist-get plist :predicate)))) |
| 1414 | ;; Maybe completion already happened and the function returned t. | 1418 | ;; Maybe completion already happened and the function returned t. |
| @@ -1433,7 +1437,7 @@ The completion method is determined by `completion-at-point-functions'." | |||
| 1433 | (completion-in-region-mode-predicate | 1437 | (completion-in-region-mode-predicate |
| 1434 | (lambda () | 1438 | (lambda () |
| 1435 | ;; We're still in the same completion field. | 1439 | ;; We're still in the same completion field. |
| 1436 | (eq (car (funcall hookfun)) start))) | 1440 | (eq (car-safe (funcall hookfun)) start))) |
| 1437 | (ol (make-overlay start end nil nil t))) | 1441 | (ol (make-overlay start end nil nil t))) |
| 1438 | ;; FIXME: We should somehow (ab)use completion-in-region-function or | 1442 | ;; FIXME: We should somehow (ab)use completion-in-region-function or |
| 1439 | ;; introduce a corresponding hook (plus another for word-completion, | 1443 | ;; introduce a corresponding hook (plus another for word-completion, |
diff --git a/src/ChangeLog b/src/ChangeLog index 40fb601e061..f9ca67e703d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -23,6 +23,16 @@ | |||
| 23 | 23 | ||
| 24 | * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long. | 24 | * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long. |
| 25 | 25 | ||
| 26 | 2011-04-28 Eli Zaretskii <eliz@gnu.org> | ||
| 27 | |||
| 28 | * doprnt.c (doprnt): Don't return value smaller than the buffer | ||
| 29 | size if the message was truncated. (Bug#8545). | ||
| 30 | |||
| 31 | 2011-04-28 Juanma Barranquero <lekktu@gmail.com> | ||
| 32 | |||
| 33 | * w32fns.c (Fx_change_window_property, Fx_delete_window_property) | ||
| 34 | (Fx_window_property): #if-0 the whole functions, not just the bodies. | ||
| 35 | |||
| 26 | 2011-04-27 Paul Eggert <eggert@cs.ucla.edu> | 36 | 2011-04-27 Paul Eggert <eggert@cs.ucla.edu> |
| 27 | 37 | ||
| 28 | * doprnt.c (doprnt): Support "ll" length modifier, for long long. | 38 | * doprnt.c (doprnt): Support "ll" length modifier, for long long. |
diff --git a/src/doprnt.c b/src/doprnt.c index a6becc7454f..63dba9f5850 100644 --- a/src/doprnt.c +++ b/src/doprnt.c | |||
| @@ -403,7 +403,9 @@ doprnt (char *buffer, register size_t bufsize, const char *format, | |||
| 403 | while (fmt < format_end && --bufsize > 0 && !CHAR_HEAD_P (*fmt)); | 403 | while (fmt < format_end && --bufsize > 0 && !CHAR_HEAD_P (*fmt)); |
| 404 | if (!CHAR_HEAD_P (*fmt)) | 404 | if (!CHAR_HEAD_P (*fmt)) |
| 405 | { | 405 | { |
| 406 | bufptr = save_bufptr; | 406 | /* Truncate, but return value that will signal to caller |
| 407 | that the buffer was too small. */ | ||
| 408 | *save_bufptr = 0; | ||
| 407 | break; | 409 | break; |
| 408 | } | 410 | } |
| 409 | } | 411 | } |
diff --git a/src/w32fns.c b/src/w32fns.c index 821cc671646..bdf9dce9411 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4865,6 +4865,8 @@ If TERMINAL is omitted or nil, that stands for the selected frame's display. */ | |||
| 4865 | Window properties | 4865 | Window properties |
| 4866 | ***********************************************************************/ | 4866 | ***********************************************************************/ |
| 4867 | 4867 | ||
| 4868 | #if 0 /* TODO : port window properties to W32 */ | ||
| 4869 | |||
| 4868 | DEFUN ("x-change-window-property", Fx_change_window_property, | 4870 | DEFUN ("x-change-window-property", Fx_change_window_property, |
| 4869 | Sx_change_window_property, 2, 6, 0, | 4871 | Sx_change_window_property, 2, 6, 0, |
| 4870 | doc: /* Change window property PROP to VALUE on the X window of FRAME. | 4872 | doc: /* Change window property PROP to VALUE on the X window of FRAME. |
| @@ -4884,7 +4886,6 @@ If OUTER_P is non-nil, the property is changed for the outer X window of | |||
| 4884 | FRAME. Default is to change on the edit X window. */) | 4886 | FRAME. Default is to change on the edit X window. */) |
| 4885 | (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) | 4887 | (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) |
| 4886 | { | 4888 | { |
| 4887 | #if 0 /* TODO : port window properties to W32 */ | ||
| 4888 | struct frame *f = check_x_frame (frame); | 4889 | struct frame *f = check_x_frame (frame); |
| 4889 | Atom prop_atom; | 4890 | Atom prop_atom; |
| 4890 | 4891 | ||
| @@ -4901,8 +4902,6 @@ FRAME. Default is to change on the edit X window. */) | |||
| 4901 | XFlush (FRAME_W32_DISPLAY (f)); | 4902 | XFlush (FRAME_W32_DISPLAY (f)); |
| 4902 | UNBLOCK_INPUT; | 4903 | UNBLOCK_INPUT; |
| 4903 | 4904 | ||
| 4904 | #endif /* TODO */ | ||
| 4905 | |||
| 4906 | return value; | 4905 | return value; |
| 4907 | } | 4906 | } |
| 4908 | 4907 | ||
| @@ -4913,8 +4912,6 @@ DEFUN ("x-delete-window-property", Fx_delete_window_property, | |||
| 4913 | FRAME nil or omitted means use the selected frame. Value is PROP. */) | 4912 | FRAME nil or omitted means use the selected frame. Value is PROP. */) |
| 4914 | (Lisp_Object prop, Lisp_Object frame) | 4913 | (Lisp_Object prop, Lisp_Object frame) |
| 4915 | { | 4914 | { |
| 4916 | #if 0 /* TODO : port window properties to W32 */ | ||
| 4917 | |||
| 4918 | struct frame *f = check_x_frame (frame); | 4915 | struct frame *f = check_x_frame (frame); |
| 4919 | Atom prop_atom; | 4916 | Atom prop_atom; |
| 4920 | 4917 | ||
| @@ -4926,7 +4923,6 @@ FRAME nil or omitted means use the selected frame. Value is PROP. */) | |||
| 4926 | /* Make sure the property is removed when we return. */ | 4923 | /* Make sure the property is removed when we return. */ |
| 4927 | XFlush (FRAME_W32_DISPLAY (f)); | 4924 | XFlush (FRAME_W32_DISPLAY (f)); |
| 4928 | UNBLOCK_INPUT; | 4925 | UNBLOCK_INPUT; |
| 4929 | #endif /* TODO */ | ||
| 4930 | 4926 | ||
| 4931 | return prop; | 4927 | return prop; |
| 4932 | } | 4928 | } |
| @@ -4951,8 +4947,6 @@ Value is nil if FRAME hasn't a property with name PROP or if PROP has | |||
| 4951 | no value of TYPE (always string in the MS Windows case). */) | 4947 | no value of TYPE (always string in the MS Windows case). */) |
| 4952 | (Lisp_Object prop, Lisp_Object frame) | 4948 | (Lisp_Object prop, Lisp_Object frame) |
| 4953 | { | 4949 | { |
| 4954 | #if 0 /* TODO : port window properties to W32 */ | ||
| 4955 | |||
| 4956 | struct frame *f = check_x_frame (frame); | 4950 | struct frame *f = check_x_frame (frame); |
| 4957 | Atom prop_atom; | 4951 | Atom prop_atom; |
| 4958 | int rc; | 4952 | int rc; |
| @@ -4992,10 +4986,10 @@ no value of TYPE (always string in the MS Windows case). */) | |||
| 4992 | 4986 | ||
| 4993 | return prop_value; | 4987 | return prop_value; |
| 4994 | 4988 | ||
| 4995 | #endif /* TODO */ | ||
| 4996 | return Qnil; | 4989 | return Qnil; |
| 4997 | } | 4990 | } |
| 4998 | 4991 | ||
| 4992 | #endif /* TODO */ | ||
| 4999 | 4993 | ||
| 5000 | 4994 | ||
| 5001 | /*********************************************************************** | 4995 | /*********************************************************************** |