Mercurial > emacs
comparison lisp/wid-edit.el @ 108774:895ee2ff8cc3
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 25 May 2010 07:23:37 +0000 |
parents | d835100c3e8b |
children | 60516122d066 |
comparison
equal
deleted
inserted
replaced
108758:2903660f846b | 108774:895ee2ff8cc3 |
---|---|
1332 (setq begin (point))) | 1332 (setq begin (point))) |
1333 (save-excursion | 1333 (save-excursion |
1334 (goto-char end) | 1334 (goto-char end) |
1335 (while (and (eq (preceding-char) ?\s) | 1335 (while (and (eq (preceding-char) ?\s) |
1336 (> (point) begin)) | 1336 (> (point) begin)) |
1337 (delete-backward-char 1))))))) | 1337 (delete-char -1))))))) |
1338 (widget-specify-secret field)) | 1338 (widget-specify-secret field)) |
1339 (widget-apply field :notify field)))) | 1339 (widget-apply field :notify field)))) |
1340 | 1340 |
1341 ;;; Widget Functions | 1341 ;;; Widget Functions |
1342 ;; | 1342 ;; |
1475 (insert (widget-get widget :format)) | 1475 (insert (widget-get widget :format)) |
1476 (goto-char from) | 1476 (goto-char from) |
1477 ;; Parse escapes in format. | 1477 ;; Parse escapes in format. |
1478 (while (re-search-forward "%\\(.\\)" nil t) | 1478 (while (re-search-forward "%\\(.\\)" nil t) |
1479 (let ((escape (char-after (match-beginning 1)))) | 1479 (let ((escape (char-after (match-beginning 1)))) |
1480 (delete-backward-char 2) | 1480 (delete-char -2) |
1481 (cond ((eq escape ?%) | 1481 (cond ((eq escape ?%) |
1482 (insert ?%)) | 1482 (insert ?%)) |
1483 ((eq escape ?\[) | 1483 ((eq escape ?\[) |
1484 (setq button-begin (point)) | 1484 (setq button-begin (point)) |
1485 (insert (widget-get-indirect widget :button-prefix))) | 1485 (insert (widget-get-indirect widget :button-prefix))) |
1508 (let ((doc (widget-get widget :doc))) | 1508 (let ((doc (widget-get widget :doc))) |
1509 (when doc | 1509 (when doc |
1510 (setq doc-begin (point)) | 1510 (setq doc-begin (point)) |
1511 (insert doc) | 1511 (insert doc) |
1512 (while (eq (preceding-char) ?\n) | 1512 (while (eq (preceding-char) ?\n) |
1513 (delete-backward-char 1)) | 1513 (delete-char -1)) |
1514 (insert ?\n) | 1514 (insert ?\n) |
1515 (setq doc-end (point))))) | 1515 (setq doc-end (point))))) |
1516 ((eq escape ?h) | 1516 ((eq escape ?h) |
1517 (widget-add-documentation-string-button widget)) | 1517 (widget-add-documentation-string-button widget)) |
1518 ((eq escape ?v) | 1518 ((eq escape ?v) |
2256 (insert (widget-get widget :entry-format)) | 2256 (insert (widget-get widget :entry-format)) |
2257 (goto-char from) | 2257 (goto-char from) |
2258 ;; Parse % escapes in format. | 2258 ;; Parse % escapes in format. |
2259 (while (re-search-forward "%\\([bv%]\\)" nil t) | 2259 (while (re-search-forward "%\\([bv%]\\)" nil t) |
2260 (let ((escape (char-after (match-beginning 1)))) | 2260 (let ((escape (char-after (match-beginning 1)))) |
2261 (delete-backward-char 2) | 2261 (delete-char -2) |
2262 (cond ((eq escape ?%) | 2262 (cond ((eq escape ?%) |
2263 (insert ?%)) | 2263 (insert ?%)) |
2264 ((eq escape ?b) | 2264 ((eq escape ?b) |
2265 (setq button (apply 'widget-create-child-and-convert | 2265 (setq button (apply 'widget-create-child-and-convert |
2266 widget 'checkbox | 2266 widget 'checkbox |
2439 (insert (widget-get widget :entry-format)) | 2439 (insert (widget-get widget :entry-format)) |
2440 (goto-char from) | 2440 (goto-char from) |
2441 ;; Parse % escapes in format. | 2441 ;; Parse % escapes in format. |
2442 (while (re-search-forward "%\\([bv%]\\)" nil t) | 2442 (while (re-search-forward "%\\([bv%]\\)" nil t) |
2443 (let ((escape (char-after (match-beginning 1)))) | 2443 (let ((escape (char-after (match-beginning 1)))) |
2444 (delete-backward-char 2) | 2444 (delete-char -2) |
2445 (cond ((eq escape ?%) | 2445 (cond ((eq escape ?%) |
2446 (insert ?%)) | 2446 (insert ?%)) |
2447 ((eq escape ?b) | 2447 ((eq escape ?b) |
2448 (setq button (apply 'widget-create-child-and-convert | 2448 (setq button (apply 'widget-create-child-and-convert |
2449 widget 'radio-button | 2449 widget 'radio-button |
2718 (insert-char ?\s (widget-get widget :indent))) | 2718 (insert-char ?\s (widget-get widget :indent))) |
2719 (insert (widget-get widget :entry-format))) | 2719 (insert (widget-get widget :entry-format))) |
2720 ;; Parse % escapes in format. | 2720 ;; Parse % escapes in format. |
2721 (while (re-search-forward "%\\(.\\)" nil t) | 2721 (while (re-search-forward "%\\(.\\)" nil t) |
2722 (let ((escape (char-after (match-beginning 1)))) | 2722 (let ((escape (char-after (match-beginning 1)))) |
2723 (delete-backward-char 2) | 2723 (delete-char -2) |
2724 (cond ((eq escape ?%) | 2724 (cond ((eq escape ?%) |
2725 (insert ?%)) | 2725 (insert ?%)) |
2726 ((eq escape ?i) | 2726 ((eq escape ?i) |
2727 (setq insert (apply 'widget-create-child-and-convert | 2727 (setq insert (apply 'widget-create-child-and-convert |
2728 widget 'insert-button | 2728 widget 'insert-button |