aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog73
-rw-r--r--lisp/calendar/diary-lib.el301
-rw-r--r--lisp/emacs-lisp/ewoc.el67
-rw-r--r--lisp/files.el1
-rw-r--r--lisp/gnus/ChangeLog11
-rw-r--r--lisp/gnus/gmm-utils.el22
-rw-r--r--lisp/gnus/gnus-sum.el4
-rw-r--r--lisp/ido.el7
-rw-r--r--lisp/international/code-pages.el4
-rw-r--r--lisp/pcvs-info.el3
-rw-r--r--lisp/pcvs.el5
-rw-r--r--lisp/progmodes/grep.el2
-rw-r--r--lisp/shell.el163
-rw-r--r--lisp/term/mac-win.el14
14 files changed, 420 insertions, 257 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 85e397cbe29..7732edb6b24 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,8 +1,81 @@
12006-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * term/mac-win.el (mac-bytes-to-digits): Remove function.
4 (mac-handle-toolbar-switch-mode): Use coercion instead of it.
5
62006-05-19 Glenn Morris <rgm@gnu.org>
7
8 * calendar/diary-lib.el (diary-bahai-date)
9 (list-bahai-diary-entries, mark-bahai-diary-entries)
10 (mark-bahai-calendar-date-pattern): Not interactive.
11 (add-to-diary-list): New optional arg LITERAL. Doc fix.
12 (diary-entries-list): Change format of 4th element in each entry.
13 (diary-list-entries): Use add-to-diary-list.
14 (diary-goto-entry): Handle the case where the buffer visiting the
15 diary has been killed.
16 (fancy-diary-display): Add 'locator to button rather than 'marker.
17 Only generate temp-face when there are marks to apply.
18 (list-sexp-diary-entries): Pass literal to add-to-diary-list.
19 (diary-fancy-date-pattern): New variable.
20 (diary-time-regexp): Doc fix.
21 (diary-anniversary, diary-time): New faces.
22 (fancy-diary-font-lock-keywords): Use diary-fancy-date-pattern and
23 diary-time-regexp. Add font-lock-multiline property where needed.
24 Use new faces diary-anniversary and diary-time.
25 (diary-fancy-font-lock-fontify-region-function): New function, to
26 handle multiline font-lock pattern in fancy diary.
27 (fancy-diary-display-mode): Set font-lock-fontify-region-function.
28 (diary-font-lock-keywords): Tweak time regexp. Use new face
29 diary-time.
30
312006-05-19 Alexander Shopov <ash@contact.bg> (tiny change)
32
33 * international/code-pages.el (mik): Table corrected.
34
352006-05-18 Kim F. Storm <storm@cua.dk>
36
37 * progmodes/grep.el (grep-find): Don't check grep-find-command
38 before running command (breaks non-interactive usage).
39
402006-05-18 Thien-Thi Nguyen <ttn@gnu.org>
41
42 * emacs-lisp/ewoc.el (ewoc--adjust): New func.
43 (ewoc--insert-new-node): Don't insert trailing newline.
44 Instead, adjust succesor nodes' start markers.
45 (ewoc--refresh-node): Delete all text from current node's start
46 marker to the next one's; adjust successor nodes' start markers.
47 (ewoc--create): Doc fixes.
48 (ewoc--refresh): Don't insert newline.
49 (ewoc--set-hf): Use `ewoc--set-buffer-bind-dll-let*'.
50 * pcvs.el (cvs-make-cvs-buffer): Specify
51 extra newline for ewoc's header and footer.
52 (cvs-update-header): Update initial header recognition.
53 Append newline to final header and footer values.
54 * pcvs-info.el (cvs-fileinfo-pp): Insert trailing newline.
55
562006-05-17 Richard Stallman <rms@gnu.org>
57
58 * files.el (file-name-extension): Doc fix.
59
602006-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
61
62 * shell.el (shell-dirtrack-mode): Make it into a proper minor mode, so
63 we can explicitly enable/disable rather than toggle.
64 (shell-mode): Use it.
65 (shell-cd): Don't try to reproduce what `cd' does.
66
672006-05-17 Kim F. Storm <storm@cua.dk>
68
69 * ido.el (ido-read-internal): Use only nondirectory part of
70 default item.
71
12006-05-17 Thien-Thi Nguyen <ttn@gnu.org> 722006-05-17 Thien-Thi Nguyen <ttn@gnu.org>
2 73
3 * emacs-lisp/ewoc.el (ewoc-data): Add docstring. 74 * emacs-lisp/ewoc.el (ewoc-data): Add docstring.
4 (ewoc-nth): Doc fix. 75 (ewoc-nth): Doc fix.
5 76
77 (ewoc-map, ewoc-invalidate): Compute PP before looping.
78
62006-05-16 Eli Zaretskii <eliz@gnu.org> 792006-05-16 Eli Zaretskii <eliz@gnu.org>
7 80
8 * international/mule.el (auto-coding-alist): Add .lha to files 81 * international/mule.el (auto-coding-alist): Add .lha to files
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index c27939b8075..95588fccd92 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -121,20 +121,16 @@ The holidays are those in the list `calendar-holidays'.")
121 "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR.") 121 "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR.")
122 122
123(autoload 'diary-bahai-date "cal-bahai" 123(autoload 'diary-bahai-date "cal-bahai"
124 "Baha'i calendar equivalent of date diary entry." 124 "Baha'i calendar equivalent of date diary entry.")
125 t)
126 125
127(autoload 'list-bahai-diary-entries "cal-bahai" 126(autoload 'list-bahai-diary-entries "cal-bahai"
128 "Add any Baha'i date entries from the diary file to `diary-entries-list'." 127 "Add any Baha'i date entries from the diary file to `diary-entries-list'.")
129 t)
130 128
131(autoload 'mark-bahai-diary-entries "cal-bahai" 129(autoload 'mark-bahai-diary-entries "cal-bahai"
132 "Mark days in the calendar window that have Baha'i date diary entries." 130 "Mark days in the calendar window that have Baha'i date diary entries.")
133 t)
134 131
135(autoload 'mark-bahai-calendar-date-pattern "cal-bahai" 132(autoload 'mark-bahai-calendar-date-pattern "cal-bahai"
136 "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR." 133 "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR.")
137 t)
138 134
139(autoload 'diary-hebrew-date "cal-hebrew" 135(autoload 'diary-hebrew-date "cal-hebrew"
140 "Hebrew calendar equivalent of date diary entry.") 136 "Hebrew calendar equivalent of date diary entry.")
@@ -323,6 +319,42 @@ number of days of diary entries displayed."
323 (integer :tag "Saturday"))) 319 (integer :tag "Saturday")))
324 :group 'diary) 320 :group 'diary)
325 321
322
323(defvar diary-modify-entry-list-string-function nil
324 "Function applied to entry string before putting it into the entries list.
325Can be used by programs integrating a diary list into other buffers (e.g.
326org.el and planner.el) to modify the string or add properties to it.
327The function takes a string argument and must return a string.")
328
329(defun add-to-diary-list (date string specifier &optional marker
330 globcolor literal)
331 "Add an entry to `diary-entries-list'.
332Do nothing if DATE or STRING is nil. DATE is the (MONTH DAY
333YEAR) for which the entry applies; STRING is the text of the
334entry as it will appear in the diary (i.e. with any format
335strings such as \"%d\" expanded); SPECIFIER is the date part of
336the entry as it appears in the diary-file; LITERAL is the entry
337as it appears in the diary-file (i.e. before expansion). If
338LITERAL is nil, it is taken to be the same as STRING.
339
340The entry is added to the list as (DATE STRING SPECIFIER LOCATOR
341GLOBCOLOR), where LOCATOR has the form (MARKER FILENAME LITERAL),
342FILENAME being the file containing the diary entry."
343 (when (and date string)
344 (if diary-file-name-prefix
345 (let ((prefix (funcall diary-file-name-prefix-function
346 (buffer-file-name))))
347 (or (string= prefix "")
348 (setq string (format "[%s] %s" prefix string)))))
349 (and diary-modify-entry-list-string-function
350 (setq string (funcall diary-modify-entry-list-string-function
351 string)))
352 (setq diary-entries-list
353 (append diary-entries-list
354 (list (list date string specifier
355 (list marker (buffer-file-name) literal)
356 globcolor))))))
357
326(define-obsolete-function-alias 'list-diary-entries 'diary-list-entries) 358(define-obsolete-function-alias 'list-diary-entries 'diary-list-entries)
327(defun diary-list-entries (date number &optional list-only) 359(defun diary-list-entries (date number &optional list-only)
328 "Create and display a buffer containing the relevant lines in `diary-file'. 360 "Create and display a buffer containing the relevant lines in `diary-file'.
@@ -468,9 +500,7 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list."
468 (copy-marker entry-start) (nth 1 temp))))))) 500 (copy-marker entry-start) (nth 1 temp)))))))
469 (or entry-found 501 (or entry-found
470 (not diary-list-include-blanks) 502 (not diary-list-include-blanks)
471 (setq diary-entries-list 503 (add-to-diary-list date "" "" "" ""))
472 (append diary-entries-list
473 (list (list date "" "" "" "")))))
474 (setq date 504 (setq date
475 (calendar-gregorian-from-absolute 505 (calendar-gregorian-from-absolute
476 (1+ (calendar-absolute-from-gregorian date)))) 506 (1+ (calendar-absolute-from-gregorian date))))
@@ -577,10 +607,27 @@ changing the variable `diary-include-string'."
577 'face 'diary-button) 607 'face 'diary-button)
578 608
579(defun diary-goto-entry (button) 609(defun diary-goto-entry (button)
580 (let ((marker (button-get button 'marker))) 610 (let* ((locator (button-get button 'locator))
581 (when marker 611 (marker (car locator))
582 (pop-to-buffer (marker-buffer marker)) 612 markbuf file)
583 (goto-char (marker-position marker))))) 613 ;; If marker pointing to diary location is valid, use that.
614 (if (and marker (setq markbuf (marker-buffer marker)))
615 (progn
616 (pop-to-buffer markbuf)
617 (goto-char (marker-position marker)))
618 ;; Marker is invalid (eg buffer has been killed).
619 (or (and (setq file (cadr locator))
620 (file-exists-p file)
621 (find-file-other-window file)
622 (progn
623 (when (eq major-mode default-major-mode) (diary-mode))
624 (goto-char (point-min))
625 (if (re-search-forward (format "%s.*\\(%s\\)"
626 (regexp-quote (nth 2 locator))
627 (regexp-quote (nth 3 locator)))
628 nil t)
629 (goto-char (match-beginning 1)))))
630 (message "Unable to locate this diary entry")))))
584 631
585(defun fancy-diary-display () 632(defun fancy-diary-display ()
586 "Prepare a diary buffer with relevant entries in a fancy, noneditable form. 633 "Prepare a diary buffer with relevant entries in a fancy, noneditable form.
@@ -666,37 +713,45 @@ This function is provided for optional use as the `diary-display-hook'."
666 713
667 (setq entry (car (cdr (car entry-list)))) 714 (setq entry (car (cdr (car entry-list))))
668 (if (< 0 (length entry)) 715 (if (< 0 (length entry))
669 (progn 716 (let ((this-entry (car entry-list))
670 (if (nth 3 (car entry-list)) 717 this-loc)
718 (if (setq this-loc (nth 3 this-entry))
671 (insert-button (concat entry "\n") 719 (insert-button (concat entry "\n")
672 'marker (nth 3 (car entry-list)) 720 ;; (MARKER FILENAME SPECIFIER LITERAL)
721 'locator (list (car this-loc)
722 (cadr this-loc)
723 (nth 2 this-entry)
724 (or (nth 2 this-loc)
725 (nth 1 this-entry)))
673 :type 'diary-entry) 726 :type 'diary-entry)
674 (insert entry ?\n)) 727 (insert entry ?\n))
675 (save-excursion 728 (save-excursion
676 (let* ((marks (nth 4 (car entry-list))) 729 (let* ((marks (nth 4 this-entry))
677 (temp-face (make-symbol 730 (faceinfo marks)
678 (apply 731 temp-face)
679 'concat "temp-face-" 732 (when marks
680 (mapcar (lambda (sym) 733 (setq temp-face (make-symbol
681 (if (stringp sym) 734 (apply
682 sym 735 'concat "temp-face-"
683 (symbol-name sym))) 736 (mapcar (lambda (sym)
684 marks)))) 737 (if (stringp sym)
685 (faceinfo marks)) 738 sym
686 (make-face temp-face) 739 (symbol-name sym)))
687 ;; Remove :face info from the marks, 740 marks))))
688 ;; copy the face info into temp-face 741 (make-face temp-face)
689 (while (setq faceinfo (memq :face faceinfo)) 742 ;; Remove :face info from the marks,
690 (copy-face (read (nth 1 faceinfo)) temp-face) 743 ;; copy the face info into temp-face
691 (setcar faceinfo nil) 744 (while (setq faceinfo (memq :face faceinfo))
692 (setcar (cdr faceinfo) nil)) 745 (copy-face (read (nth 1 faceinfo)) temp-face)
693 (setq marks (delq nil marks)) 746 (setcar faceinfo nil)
694 ;; Apply the font aspects. 747 (setcar (cdr faceinfo) nil))
695 (apply 'set-face-attribute temp-face nil marks) 748 (setq marks (delq nil marks))
696 (search-backward entry) 749 ;; Apply the font aspects.
697 (overlay-put 750 (apply 'set-face-attribute temp-face nil marks)
698 (make-overlay (match-beginning 0) (match-end 0)) 751 (search-backward entry)
699 'face temp-face))))) 752 (overlay-put
753 (make-overlay (match-beginning 0) (match-end 0))
754 'face temp-face))))))
700 (setq entry-list (cdr entry-list)))) 755 (setq entry-list (cdr entry-list))))
701 (set-buffer-modified-p nil) 756 (set-buffer-modified-p nil)
702 (goto-char (point-min)) 757 (goto-char (point-min))
@@ -1350,7 +1405,7 @@ best if they are nonmarking."
1350 (setq line-start (point))) 1405 (setq line-start (point)))
1351 (setq specifier 1406 (setq specifier
1352 (buffer-substring-no-properties (1+ line-start) (point)) 1407 (buffer-substring-no-properties (1+ line-start) (point))
1353 entry-start (1+ line-start)) 1408 entry-start (1+ line-start))
1354 (forward-char 1) 1409 (forward-char 1)
1355 (if (and (or (char-equal (preceding-char) ?\^M) 1410 (if (and (or (char-equal (preceding-char) ?\^M)
1356 (char-equal (preceding-char) ?\n)) 1411 (char-equal (preceding-char) ?\n))
@@ -1367,24 +1422,26 @@ best if they are nonmarking."
1367 (while (string-match "[\^M]" entry) 1422 (while (string-match "[\^M]" entry)
1368 (aset entry (match-beginning 0) ?\n ))) 1423 (aset entry (match-beginning 0) ?\n )))
1369 (let ((diary-entry (diary-sexp-entry sexp entry date)) 1424 (let ((diary-entry (diary-sexp-entry sexp entry date))
1370 temp) 1425 temp literal)
1371 (setq entry (if (consp diary-entry) 1426 (setq literal entry ; before evaluation
1372 (cdr diary-entry) 1427 entry (if (consp diary-entry)
1373 diary-entry)) 1428 (cdr diary-entry)
1429 diary-entry))
1374 (if diary-entry 1430 (if diary-entry
1375 (progn 1431 (progn
1376 (remove-overlays line-start (point) 'invisible 'diary) 1432 (remove-overlays line-start (point) 'invisible 'diary)
1377 (if (< 0 (length entry)) 1433 (if (< 0 (length entry))
1378 (setq temp (diary-pull-attrs entry file-glob-attrs) 1434 (setq temp (diary-pull-attrs entry file-glob-attrs)
1379 entry (nth 0 temp) 1435 entry (nth 0 temp)
1380 marks (nth 1 temp))))) 1436 marks (nth 1 temp)))))
1381 (add-to-diary-list date 1437 (add-to-diary-list date
1382 entry 1438 entry
1383 specifier 1439 specifier
1384 (if entry-start (copy-marker entry-start) 1440 (if entry-start (copy-marker entry-start)
1385 nil) 1441 nil)
1386 marks) 1442 marks
1387 (setq entry-found (or entry-found diary-entry))))) 1443 literal)
1444 (setq entry-found (or entry-found diary-entry)))))
1388 entry-found)) 1445 entry-found))
1389 1446
1390(defun diary-sexp-entry (sexp entry date) 1447(defun diary-sexp-entry (sexp entry date)
@@ -1636,28 +1693,6 @@ marked on the calendar."
1636 (or (diary-remind sexp (car days) marking) 1693 (or (diary-remind sexp (car days) marking)
1637 (diary-remind sexp (cdr days) marking)))))) 1694 (diary-remind sexp (cdr days) marking))))))
1638 1695
1639(defvar diary-modify-entry-list-string-function nil
1640 "Function applied to entry string before putting it into the entries list.
1641Can be used by programs integrating a diary list into other buffers (e.g.
1642org.el and planner.el) to modify the string or add properties to it.
1643The function takes a string argument and must return a string.")
1644
1645(defun add-to-diary-list (date string specifier &optional marker globcolor)
1646 "Add the entry (DATE STRING SPECIFIER MARKER GLOBCOLOR) to `diary-entries-list'.
1647Do nothing if DATE or STRING is nil."
1648 (when (and date string)
1649 (if diary-file-name-prefix
1650 (let ((prefix (funcall diary-file-name-prefix-function
1651 (buffer-file-name))))
1652 (or (string= prefix "")
1653 (setq string (format "[%s] %s" prefix string)))))
1654 (and diary-modify-entry-list-string-function
1655 (setq string (funcall diary-modify-entry-list-string-function
1656 string)))
1657 (setq diary-entries-list
1658 (append diary-entries-list
1659 (list (list date string specifier marker globcolor))))))
1660
1661(defun diary-redraw-calendar () 1696(defun diary-redraw-calendar ()
1662 "If `calendar-buffer' is live and diary entries are marked, redraw it." 1697 "If `calendar-buffer' is live and diary entries are marked, redraw it."
1663 (and mark-diary-entries-in-calendar 1698 (and mark-diary-entries-in-calendar
@@ -1796,36 +1831,86 @@ Prefix arg will make the entry nonmarking."
1796 (if diary-header-line-flag 1831 (if diary-header-line-flag
1797 (setq header-line-format diary-header-line-format))) 1832 (setq header-line-format diary-header-line-format)))
1798 1833
1799(define-derived-mode fancy-diary-display-mode fundamental-mode
1800 "Diary"
1801 "Major mode used while displaying diary entries using Fancy Display."
1802 (set (make-local-variable 'font-lock-defaults)
1803 '(fancy-diary-font-lock-keywords t))
1804 (local-set-key "q" 'quit-window))
1805 1834
1835(defvar diary-fancy-date-pattern
1836 (concat
1837 (let ((dayname (diary-name-pattern calendar-day-name-array nil t))
1838 (monthname (diary-name-pattern calendar-month-name-array nil t))
1839 (day "[0-9]+")
1840 (month "[0-9]+")
1841 (year "-?[0-9]+"))
1842 (mapconcat 'eval calendar-date-display-form ""))
1843 ;; Optional ": holiday name" after the date.
1844 "\\(: .*\\)?")
1845 "Regular expression matching a date header in Fancy Diary.")
1846
1847(defconst diary-time-regexp
1848 ;; Accepted formats: 10:00 10.00 10h00 10h 10am 10:00am 10.00am
1849 ;; Use of "." as a separator annoyingly matches numbers, eg "123.45".
1850 ;; Hence often prefix this with "\\(^\\|\\s-\\)."
1851 (concat "[0-9]?[0-9]\\([AaPp][mM]\\|\\("
1852 "[Hh]\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]"
1853 "\\)\\([AaPp][Mm]\\)?\\)")
1854 "Regular expression matching a time of day.")
1855
1856(defface diary-anniversary '((t :inherit font-lock-keyword-face))
1857 "Face used for anniversaries in the diary."
1858 :version "22.1"
1859 :group 'diary)
1860
1861(defface diary-time '((t :inherit font-lock-variable-name-face))
1862 "Face used for times of day in the diary."
1863 :version "22.1"
1864 :group 'diary)
1806 1865
1807(defvar fancy-diary-font-lock-keywords 1866(defvar fancy-diary-font-lock-keywords
1808 (list 1867 (list
1809 (cons 1868 (list
1810 (concat 1869 ;; Any number of " other holiday name" lines, followed by "==" line.
1811 (let ((dayname (diary-name-pattern calendar-day-name-array nil t)) 1870 (concat diary-fancy-date-pattern "\\(\n +.*\\)*\n=+$")
1812 (monthname (diary-name-pattern calendar-month-name-array nil t)) 1871 '(0 (progn (put-text-property (match-beginning 0) (match-end 0)
1813 (day "[0-9]+") 1872 'font-lock-multiline t)
1814 (month "[0-9]+") 1873 diary-face)))
1815 (year "-?[0-9]+")) 1874 '("^.*\\([aA]nniversary\\|[bB]irthday\\).*$" . 'diary-anniversary)
1816 (mapconcat 'eval calendar-date-display-form ""))
1817 "\\(\\(: .*\\)\\|\\(\n +.*\\)\\)*\n=+$")
1818 'diary-face)
1819 '("^.*anniversary.*$" . font-lock-keyword-face)
1820 '("^.*birthday.*$" . font-lock-keyword-face)
1821 '("^.*Yahrzeit.*$" . font-lock-reference-face) 1875 '("^.*Yahrzeit.*$" . font-lock-reference-face)
1822 '("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face) 1876 '("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face)
1823 '("^Day.*omer.*$" . font-lock-builtin-face) 1877 '("^Day.*omer.*$" . font-lock-builtin-face)
1824 '("^Parashat.*$" . font-lock-comment-face) 1878 '("^Parashat.*$" . font-lock-comment-face)
1825 '("^[ \t]*[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\(-[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\)?" 1879 `(,(format "\\(^\\|\\s-\\)%s\\(-%s\\)?" diary-time-regexp
1826 . font-lock-variable-name-face)) 1880 diary-time-regexp) . 'diary-time))
1827 "Keywords to highlight in fancy diary display") 1881 "Keywords to highlight in fancy diary display")
1828 1882
1883;; If region looks like it might start or end in the middle of a
1884;; multiline pattern, extend the region to encompass the whole pattern.
1885(defun diary-fancy-font-lock-fontify-region-function (beg end &optional verbose)
1886 "Function to use for `font-lock-fontify-region-function' in Fancy Diary.
1887Needed to handle multiline keyword in `fancy-diary-font-lock-keywords'."
1888 (goto-char beg)
1889 (forward-line 0)
1890 (if (looking-at "=+$") (forward-line -1))
1891 (while (and (looking-at " +[^ ]")
1892 (zerop (forward-line -1))))
1893 ;; This check not essential.
1894 (if (looking-at diary-fancy-date-pattern)
1895 (setq beg (line-beginning-position)))
1896 (goto-char end)
1897 (forward-line 0)
1898 (while (and (looking-at " +[^ ]")
1899 (zerop (forward-line 1))))
1900 (if (looking-at "=+$")
1901 (setq end (line-beginning-position 2)))
1902 (font-lock-default-fontify-region beg end verbose))
1903
1904(define-derived-mode fancy-diary-display-mode fundamental-mode
1905 "Diary"
1906 "Major mode used while displaying diary entries using Fancy Display."
1907 (set (make-local-variable 'font-lock-defaults)
1908 '(fancy-diary-font-lock-keywords
1909 t nil nil nil
1910 (font-lock-fontify-region-function
1911 . diary-fancy-font-lock-fontify-region-function)))
1912 (local-set-key "q" 'quit-window))
1913
1829 1914
1830(defun diary-font-lock-sexps (limit) 1915(defun diary-font-lock-sexps (limit)
1831 "Recognize sexp diary entry for font-locking." 1916 "Recognize sexp diary entry for font-locking."
@@ -1877,13 +1962,6 @@ names."
1877(eval-when-compile (require 'cal-hebrew) 1962(eval-when-compile (require 'cal-hebrew)
1878 (require 'cal-islam)) 1963 (require 'cal-islam))
1879 1964
1880(defconst diary-time-regexp
1881 ;; Formats that should be accepted:
1882 ;; 10:00 10.00 10h00 10h 10am 10:00am 10.00am
1883 (concat "[0-9]?[0-9]\\([AaPp][mM]\\|\\("
1884 "[Hh]\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]"
1885 "\\)\\([AaPp][Mm]\\)?\\)"))
1886
1887(defvar diary-font-lock-keywords 1965(defvar diary-font-lock-keywords
1888 (append 1966 (append
1889 (diary-font-lock-date-forms calendar-month-name-array 1967 (diary-font-lock-date-forms calendar-month-name-array
@@ -1924,10 +2002,9 @@ names."
1924 "?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)") 2002 "?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)")
1925 '(1 font-lock-reference-face)) 2003 '(1 font-lock-reference-face))
1926 '(diary-font-lock-sexps . font-lock-keyword-face) 2004 '(diary-font-lock-sexps . font-lock-keyword-face)
1927 (cons 2005 `(,(concat "\\(^\\|\\s-\\)"
1928 (concat ;; "^[ \t]+" 2006 diary-time-regexp "\\(-" diary-time-regexp "\\)?")
1929 diary-time-regexp "\\(-" diary-time-regexp "\\)?") 2007 . 'diary-time)))
1930 'font-lock-function-name-face)))
1931 "Forms to highlight in `diary-mode'.") 2008 "Forms to highlight in `diary-mode'.")
1932 2009
1933 2010
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index fa85ce21fb0..7742de944cb 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -205,6 +205,22 @@ BUT if it is the header or the footer in EWOC return nil instead."
205 (eq node (ewoc--footer ewoc))) 205 (eq node (ewoc--footer ewoc)))
206 node)) 206 node))
207 207
208(defun ewoc--adjust (beg end node)
209 ;; "Manually reseat" markers for NODE and its successors (including footer
210 ;; and dll), in the case where they originally shared start position with
211 ;; BEG, to END. BEG and END are buffer positions describing NODE's left
212 ;; neighbor. This operation is functionally equivalent to temporarily
213 ;; setting these nodes' markers' insertion type to t around the pretty-print
214 ;; call that precedes the call to `ewoc-adjust', and then changing them back
215 ;; to nil.
216 (when (< beg end)
217 (let (m)
218 (while (and (= beg (setq m (ewoc--node-start-marker node)))
219 (progn
220 (set-marker m end)
221 (not (eq dll node))))
222 (setq node (ewoc--node-right node))))))
223
208(defun ewoc--insert-new-node (node data pretty-printer) 224(defun ewoc--insert-new-node (node data pretty-printer)
209 "Insert before NODE a new node for DATA, displayed by PRETTY-PRINTER. 225 "Insert before NODE a new node for DATA, displayed by PRETTY-PRINTER.
210Call PRETTY-PRINTER with point at NODE's start, thus pushing back 226Call PRETTY-PRINTER with point at NODE's start, thus pushing back
@@ -215,29 +231,26 @@ NODE and leaving the new node's start there. Return the new node."
215 (pos (marker-position m)) 231 (pos (marker-position m))
216 (elemnode (ewoc--node-create m data))) 232 (elemnode (ewoc--node-create m data)))
217 (goto-char pos) 233 (goto-char pos)
218 ;; Insert the trailing newline using insert-before-markers
219 ;; so that the start position for the next element is updated.
220 (insert-before-markers ?\n)
221 ;; Move back, and call the pretty-printer.
222 (backward-char 1)
223 (funcall pretty-printer data) 234 (funcall pretty-printer data)
224 (setf (marker-position m) pos 235 (setf (marker-position m) pos
225 (ewoc--node-left elemnode) (ewoc--node-left node) 236 (ewoc--node-left elemnode) (ewoc--node-left node)
226 (ewoc--node-right elemnode) node 237 (ewoc--node-right elemnode) node
227 (ewoc--node-right (ewoc--node-left node)) elemnode 238 (ewoc--node-right (ewoc--node-left node)) elemnode
228 (ewoc--node-left node) elemnode) 239 (ewoc--node-left node) elemnode)
240 (ewoc--adjust pos (point) node)
229 elemnode))) 241 elemnode)))
230 242
231(defun ewoc--refresh-node (pp node) 243(defun ewoc--refresh-node (pp node)
232 "Redisplay the element represented by NODE using the pretty-printer PP." 244 "Redisplay the element represented by NODE using the pretty-printer PP."
233 (let ((inhibit-read-only t)) 245 (let ((inhibit-read-only t)
246 (m (ewoc--node-start-marker node))
247 (R (ewoc--node-right node)))
234 ;; First, remove the string from the buffer: 248 ;; First, remove the string from the buffer:
235 (delete-region (ewoc--node-start-marker node) 249 (delete-region m (ewoc--node-start-marker R))
236 (1- (marker-position
237 (ewoc--node-start-marker (ewoc--node-right node)))))
238 ;; Calculate and insert the string. 250 ;; Calculate and insert the string.
239 (goto-char (ewoc--node-start-marker node)) 251 (goto-char m)
240 (funcall pp (ewoc--node-data node)))) 252 (funcall pp (ewoc--node-data node))
253 (ewoc--adjust m (point) R)))
241 254
242;;; =========================================================================== 255;;; ===========================================================================
243;;; Public members of the Ewoc package 256;;; Public members of the Ewoc package
@@ -251,14 +264,12 @@ The ewoc will be inserted in the current buffer at the current position.
251PRETTY-PRINTER should be a function that takes one argument, an 264PRETTY-PRINTER should be a function that takes one argument, an
252element, and inserts a string representing it in the buffer (at 265element, and inserts a string representing it in the buffer (at
253point). The string PRETTY-PRINTER inserts may be empty or span 266point). The string PRETTY-PRINTER inserts may be empty or span
254several lines. A trailing newline will always be inserted 267several lines. The PRETTY-PRINTER should use `insert', and not
255automatically. The PRETTY-PRINTER should use `insert', and not
256`insert-before-markers'. 268`insert-before-markers'.
257 269
258Optional second argument HEADER is a string that will always be 270Optional second and third arguments HEADER and FOOTER are strings,
259present at the top of the ewoc. HEADER should end with a 271possibly empty, that will always be present at the top and bottom,
260newline. Optional third argument FOOTER is similar, and will 272respectively, of the ewoc."
261be inserted at the bottom of the ewoc."
262 (let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST)) 273 (let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST))
263 (dll (progn (setf (ewoc--node-right dummy-node) dummy-node) 274 (dll (progn (setf (ewoc--node-right dummy-node) dummy-node)
264 (setf (ewoc--node-left dummy-node) dummy-node) 275 (setf (ewoc--node-left dummy-node) dummy-node)
@@ -352,11 +363,12 @@ If more than two arguments are given, the remaining
352arguments will be passed to MAP-FUNCTION." 363arguments will be passed to MAP-FUNCTION."
353 (ewoc--set-buffer-bind-dll-let* ewoc 364 (ewoc--set-buffer-bind-dll-let* ewoc
354 ((footer (ewoc--footer ewoc)) 365 ((footer (ewoc--footer ewoc))
366 (pp (ewoc--pretty-printer ewoc))
355 (node (ewoc--node-nth dll 1))) 367 (node (ewoc--node-nth dll 1)))
356 (save-excursion 368 (save-excursion
357 (while (not (eq node footer)) 369 (while (not (eq node footer))
358 (if (apply map-function (ewoc--node-data node) args) 370 (if (apply map-function (ewoc--node-data node) args)
359 (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)) 371 (ewoc--refresh-node pp node))
360 (setq node (ewoc--node-next dll node)))))) 372 (setq node (ewoc--node-next dll node))))))
361 373
362(defun ewoc-filter (ewoc predicate &rest args) 374(defun ewoc-filter (ewoc predicate &rest args)
@@ -465,10 +477,11 @@ If the EWOC is empty, nil is returned."
465(defun ewoc-invalidate (ewoc &rest nodes) 477(defun ewoc-invalidate (ewoc &rest nodes)
466 "Call EWOC's pretty-printer for each element in NODES. 478 "Call EWOC's pretty-printer for each element in NODES.
467Delete current text first, thus effecting a \"refresh\"." 479Delete current text first, thus effecting a \"refresh\"."
468 (ewoc--set-buffer-bind-dll ewoc 480 (ewoc--set-buffer-bind-dll-let* ewoc
481 ((pp (ewoc--pretty-printer ewoc)))
469 (save-excursion 482 (save-excursion
470 (dolist (node nodes) 483 (dolist (node nodes)
471 (ewoc--refresh-node (ewoc--pretty-printer ewoc) node))))) 484 (ewoc--refresh-node pp node)))))
472 485
473(defun ewoc-goto-prev (ewoc arg) 486(defun ewoc-goto-prev (ewoc arg)
474 "Move point to the ARGth previous element in EWOC. 487 "Move point to the ARGth previous element in EWOC.
@@ -525,7 +538,6 @@ number of elements needs to be refreshed."
525 (while (not (eq node footer)) 538 (while (not (eq node footer))
526 (set-marker (ewoc--node-start-marker node) (point)) 539 (set-marker (ewoc--node-start-marker node) (point))
527 (funcall pp (ewoc--node-data node)) 540 (funcall pp (ewoc--node-data node))
528 (insert "\n")
529 (setq node (ewoc--node-next dll node))))) 541 (setq node (ewoc--node-next dll node)))))
530 (set-marker (ewoc--node-start-marker footer) (point)))) 542 (set-marker (ewoc--node-start-marker footer) (point))))
531 543
@@ -564,11 +576,14 @@ Return nil if the buffer has been deleted."
564 576
565(defun ewoc-set-hf (ewoc header footer) 577(defun ewoc-set-hf (ewoc header footer)
566 "Set the HEADER and FOOTER of EWOC." 578 "Set the HEADER and FOOTER of EWOC."
567 (setf (ewoc--node-data (ewoc--header ewoc)) header) 579 (ewoc--set-buffer-bind-dll-let* ewoc
568 (setf (ewoc--node-data (ewoc--footer ewoc)) footer) 580 ((head (ewoc--header ewoc))
569 (save-excursion 581 (foot (ewoc--footer ewoc)))
570 (ewoc--refresh-node 'insert (ewoc--header ewoc)) 582 (setf (ewoc--node-data head) header
571 (ewoc--refresh-node 'insert (ewoc--footer ewoc)))) 583 (ewoc--node-data foot) footer)
584 (save-excursion
585 (ewoc--refresh-node 'insert head)
586 (ewoc--refresh-node 'insert foot))))
572 587
573 588
574(provide 'ewoc) 589(provide 'ewoc)
diff --git a/lisp/files.el b/lisp/files.el
index 4d9fca8bf36..4e8c5623183 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3063,6 +3063,7 @@ except that a leading `.', if any, doesn't count."
3063(defun file-name-extension (filename &optional period) 3063(defun file-name-extension (filename &optional period)
3064 "Return FILENAME's final \"extension\". 3064 "Return FILENAME's final \"extension\".
3065The extension, in a file name, is the part that follows the last `.', 3065The extension, in a file name, is the part that follows the last `.',
3066excluding version numbers and backup suffixes,
3066except that a leading `.', if any, doesn't count. 3067except that a leading `.', if any, doesn't count.
3067Return nil for extensionless file names such as `foo'. 3068Return nil for extensionless file names such as `foo'.
3068Return the empty string for file names such as `foo.'. 3069Return the empty string for file names such as `foo.'.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7f0f248c7cf..1e5bfa23ed3 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,13 @@
12006-05-18 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus-sum.el (gnus-summary-save-article-mail): Clarify doc string.
4 (gnus-summary-expire-articles-now): Shorten prompt.
5
6 * gmm-utils.el (wid-edit): Require.
7 (defun-gmm): Renamed from `gmm-defun-compat'.
8 (gmm-image-search-load-path): Use it.
9 (gmm-image-load-path-for-library): Use it. Sync with `mh-compat.el'.
10
12006-05-04 Stefan Monnier <monnier@iro.umontreal.ca> 112006-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * mm-decode.el (mm-dissect-buffer): Remove spurious double assignment. 13 * mm-decode.el (mm-dissect-buffer): Remove spurious double assignment.
@@ -4112,6 +4122,7 @@ See ChangeLog.2 for earlier changes.
4112 4122
4113;; Local Variables: 4123;; Local Variables:
4114;; coding: iso-2022-7bit 4124;; coding: iso-2022-7bit
4125;; fill-column: 79
4115;; End: 4126;; End:
4116 4127
4117;;; arch-tag: 3f33a3e7-090d-492b-bedd-02a1417d32b4 4128;;; arch-tag: 3f33a3e7-090d-492b-bedd-02a1417d32b4
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
index 4db811053ec..f314d0e81d7 100644
--- a/lisp/gnus/gmm-utils.el
+++ b/lisp/gnus/gmm-utils.el
@@ -30,7 +30,7 @@
30 30
31;;; Code: 31;;; Code:
32 32
33;; (require 'wid-edit) 33(require 'wid-edit)
34 34
35(defgroup gmm nil 35(defgroup gmm nil
36 "Utility functions for Gnus, Message and MML" 36 "Utility functions for Gnus, Message and MML"
@@ -279,11 +279,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST."
279 icon-list)) 279 icon-list))
280 tool-bar-map)) 280 tool-bar-map))
281 281
282;; WARNING: The following is subject to change. Don't rely on it yet. 282(defmacro defun-gmm (name function arg-list &rest body)
283
284;; From MH-E without modifications:
285
286(defmacro gmm-defun-compat (name function arg-list &rest body)
287 "Create function NAME. 283 "Create function NAME.
288If FUNCTION exists, then NAME becomes an alias for FUNCTION. 284If FUNCTION exists, then NAME becomes an alias for FUNCTION.
289Otherwise, create function NAME with ARG-LIST and BODY." 285Otherwise, create function NAME with ARG-LIST and BODY."
@@ -292,21 +288,19 @@ Otherwise, create function NAME with ARG-LIST and BODY."
292 `(defalias ',name ',function) 288 `(defalias ',name ',function)
293 `(defun ,name ,arg-list ,@body)))) 289 `(defun ,name ,arg-list ,@body))))
294 290
295(gmm-defun-compat gmm-image-search-load-path 291(defun-gmm gmm-image-search-load-path
296 image-search-load-path (file &optional path) 292 image-search-load-path (file &optional path)
297 "Emacs 21 and XEmacs don't have `image-search-load-path'. 293 "Emacs 21 and XEmacs don't have `image-search-load-path'.
298This function returns nil on those systems." 294This function returns nil on those systems."
299 nil) 295 nil)
300 296
301;; From MH-E with modifications: 297;; Cf. `mh-image-load-path-for-library' in `mh-compat.el'.
302
303;; Don't use `gmm-defun-compat' until API changes in
304;; `image-load-path-for-library' in Emacs CVS are completed.
305 298
306(defun gmm-image-load-path-for-library (library image &optional path no-error) 299(defun-gmm gmm-image-load-path-for-library
307 "Return a suitable search path for images relative to LIBRARY. 300 image-load-path-for-library (library image &optional path no-error)
301 "Return a suitable search path for images used by LIBRARY.
308 302
309First it searches for IMAGE in `image-load-path' (excluding 303It searches for IMAGE in `image-load-path' (excluding
310\"`data-directory'/images\") and `load-path', followed by a path 304\"`data-directory'/images\") and `load-path', followed by a path
311suitable for LIBRARY, which includes \"../../etc/images\" and 305suitable for LIBRARY, which includes \"../../etc/images\" and
312\"../etc/images\" relative to the library file itself, and then 306\"../etc/images\" relative to the library file itself, and then
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index daecb1701cd..5208ae27eb9 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -9507,7 +9507,7 @@ deleted forever, right now."
9507 (interactive) 9507 (interactive)
9508 (or gnus-expert-user 9508 (or gnus-expert-user
9509 (gnus-yes-or-no-p 9509 (gnus-yes-or-no-p
9510 "Are you really, really, really sure you want to delete all these messages? ") 9510 "Are you really, really sure you want to delete all expirable messages? ")
9511 (error "Phew!")) 9511 (error "Phew!"))
9512 (gnus-summary-expire-articles t)) 9512 (gnus-summary-expire-articles t))
9513 9513
@@ -11043,7 +11043,7 @@ If HEADERS (the symbolic prefix), include the headers, too."
11043 (gnus-configure-windows 'pipe)))) 11043 (gnus-configure-windows 'pipe))))
11044 11044
11045(defun gnus-summary-save-article-mail (&optional arg) 11045(defun gnus-summary-save-article-mail (&optional arg)
11046 "Append the current article to an mail file. 11046 "Append the current article to a Unix mail box file.
11047If N is a positive number, save the N next articles. 11047If N is a positive number, save the N next articles.
11048If N is a negative number, save the N previous articles. 11048If N is a negative number, save the N previous articles.
11049If N is nil and any articles have been marked with the process mark, 11049If N is nil and any articles have been marked with the process mark,
diff --git a/lisp/ido.el b/lisp/ido.el
index a622a7e6275..d03c002d597 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1778,7 +1778,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
1778 "Perform the `ido-read-buffer' and `ido-read-file-name' functions. 1778 "Perform the `ido-read-buffer' and `ido-read-file-name' functions.
1779Return the name of a buffer or file selected. 1779Return the name of a buffer or file selected.
1780PROMPT is the prompt to give to the user. 1780PROMPT is the prompt to give to the user.
1781DEFAULT if given is the default directory to start with. 1781DEFAULT if given is the default item to start with.
1782If REQUIRE-MATCH is non-nil, an existing file must be selected. 1782If REQUIRE-MATCH is non-nil, an existing file must be selected.
1783If INITIAL is non-nil, it specifies the initial input string." 1783If INITIAL is non-nil, it specifies the initial input string."
1784 (let 1784 (let
@@ -1822,7 +1822,10 @@ If INITIAL is non-nil, it specifies the initial input string."
1822 (cond 1822 (cond
1823 ((eq item 'buffer) 1823 ((eq item 'buffer)
1824 (if (bufferp default) (buffer-name default) default)) 1824 (if (bufferp default) (buffer-name default) default))
1825 ((stringp default) default) 1825 ((stringp default)
1826 (if (memq item '(file dir))
1827 (file-name-nondirectory default)
1828 default))
1826 ((eq item 'file) 1829 ((eq item 'file)
1827 (and ido-enable-last-directory-history 1830 (and ido-enable-last-directory-history
1828 (let ((d (assoc ido-current-directory ido-last-directory-list))) 1831 (let ((d (assoc ido-current-directory ido-last-directory-list)))
diff --git a/lisp/international/code-pages.el b/lisp/international/code-pages.el
index 359773ac346..13181268b36 100644
--- a/lisp/international/code-pages.el
+++ b/lisp/international/code-pages.el
@@ -4489,7 +4489,7 @@ Return an updated `non-iso-charset-alist'."
4489 4489
4490;; Suggested by Anton Zinoviev <anton@lml.bas.bg>: Bulgarian DOS 4490;; Suggested by Anton Zinoviev <anton@lml.bas.bg>: Bulgarian DOS
4491;; codepage. Table at 4491;; codepage. Table at
4492;; <URL:http://czyborra.com/charsets/bulgarian-mik.txt.gz>. 4492;; <http://en.wikipedia.org/wiki/MIK_Code_page>.
4493;;;###autoload(autoload-coding-system 'mik '(require 'code-pages)) 4493;;;###autoload(autoload-coding-system 'mik '(require 'code-pages))
4494(cp-make-coding-system 4494(cp-make-coding-system
4495 mik 4495 mik
@@ -4497,7 +4497,7 @@ Return an updated `non-iso-charset-alist'."
4497 ?Ч ?Ш ?Щ ?Ъ ?Ы ?Ь ?Э ?Ю ?Я ?а ?б ?в ?г ?д ?е ?ж ?з ?и ?й ?к ?л ?м ?н 4497 ?Ч ?Ш ?Щ ?Ъ ?Ы ?Ь ?Э ?Ю ?Я ?а ?б ?в ?г ?д ?е ?ж ?з ?и ?й ?к ?л ?м ?н
4498 ?о ?п ?р ?с ?т ?у ?ф ?х ?ц ?ч ?ш ?щ ?ъ ?ы ?ь ?э ?ю ?я ?└ ?┴ ?┬ ?├ ?─ 4498 ?о ?п ?р ?с ?т ?у ?ф ?х ?ц ?ч ?ш ?щ ?ъ ?ы ?ь ?э ?ю ?я ?└ ?┴ ?┬ ?├ ?─
4499 ?┼ ?╣ ?║ ?╚ ?╔ ?╩ ?╦ ?╠ ?═ ?╬ ?┐ ?░ ?▒ ?▓ ?│ ?┤ ?№ ?§ ?╗ ?╝ ?┘ ?┌ ?█ 4499 ?┼ ?╣ ?║ ?╚ ?╔ ?╩ ?╦ ?╠ ?═ ?╬ ?┐ ?░ ?▒ ?▓ ?│ ?┤ ?№ ?§ ?╗ ?╝ ?┘ ?┌ ?█
4500 ?▄ ?▌ ?▐ ?▀ ?α ?β ?Γ ?π ?Σ ?σ ?μ ?τ ?Φ ?Θ ?Ω ?δ ?∞ ? ? ?∩ ?≡ ?± ?≥ 4500 ?▄ ?▌ ?▐ ?▀ ?α ?ß ?Γ ?π ?Σ ?σ ?µ ?τ ?Φ ?Θ ?Ω ?δ ?∞ ?φ ?ε ?∩ ?≡ ?± ?≥
4501 ?≤ ?⌠ ?⌡ ?÷ ?≈ ?° ?∙ ?· ?√ ?ⁿ ?² ?■ ? ]) 4501 ?≤ ?⌠ ?⌡ ?÷ ?≈ ?° ?∙ ?· ?√ ?ⁿ ?² ?■ ? ])
4502(coding-system-put 'mik 'mime-charset nil) 4502(coding-system-put 'mik 'mime-charset nil)
4503 4503
diff --git a/lisp/pcvs-info.el b/lisp/pcvs-info.el
index 4aaa5add58d..085f294e6fb 100644
--- a/lisp/pcvs-info.el
+++ b/lisp/pcvs-info.el
@@ -379,7 +379,8 @@ For use by the cookie package."
379 ;; or nothing 379 ;; or nothing
380 ""))) 380 "")))
381 (format "%-11s %s %-11s %-11s %s" 381 (format "%-11s %s %-11s %-11s %s"
382 side status type base file))))))) 382 side status type base file))))
383 "\n")))
383 384
384 385
385(defun cvs-fileinfo-update (fi fi-new) 386(defun cvs-fileinfo-update (fi fi-new)
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index b9d04522181..7209c135e52 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -467,7 +467,7 @@ If non-nil, NEW means to create a new buffer no matter what."
467 (cvs-mode) 467 (cvs-mode)
468 (set (make-local-variable 'list-buffers-directory) buffer-name) 468 (set (make-local-variable 'list-buffers-directory) buffer-name)
469 ;;(set (make-local-variable 'cvs-temp-buffer) (cvs-temp-buffer)) 469 ;;(set (make-local-variable 'cvs-temp-buffer) (cvs-temp-buffer))
470 (let ((cookies (ewoc-create 'cvs-fileinfo-pp "\n" ""))) 470 (let ((cookies (ewoc-create 'cvs-fileinfo-pp "\n\n" "\n")))
471 (set (make-local-variable 'cvs-cookies) cookies) 471 (set (make-local-variable 'cvs-cookies) cookies)
472 (add-hook 'kill-buffer-hook 472 (add-hook 'kill-buffer-hook
473 (lambda () 473 (lambda ()
@@ -618,7 +618,7 @@ If non-nil, NEW means to create a new buffer no matter what."
618 (str (car hf)) 618 (str (car hf))
619 (done "") 619 (done "")
620 (tin (ewoc-nth cvs-cookies 0))) 620 (tin (ewoc-nth cvs-cookies 0)))
621 (if (eq (length str) 1) (setq str "")) 621 (if (eq (length str) 2) (setq str ""))
622 ;; look for the first *real* fileinfo (to determine emptyness) 622 ;; look for the first *real* fileinfo (to determine emptyness)
623 (while 623 (while
624 (and tin 624 (and tin
@@ -633,6 +633,7 @@ If non-nil, NEW means to create a new buffer no matter what."
633 (setq str (replace-match "" t t str)) 633 (setq str (replace-match "" t t str))
634 (if (zerop (length str)) (setq str "\n")) 634 (if (zerop (length str)) (setq str "\n"))
635 (setq done (concat "-- last cmd: " cmd " --")))) 635 (setq done (concat "-- last cmd: " cmd " --"))))
636 (setq str (concat str "\n") done (concat done "\n"))
636 ;; set the new header and footer 637 ;; set the new header and footer
637 (ewoc-set-hf cvs-cookies 638 (ewoc-set-hf cvs-cookies
638 str (concat "\n--------------------- " 639 str (concat "\n--------------------- "
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 410a973d1b4..d207094cafe 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -553,7 +553,7 @@ easily repeat a find command."
553 (read-string 553 (read-string
554 "compile.el: No `grep-find-command' command available. Press RET.") 554 "compile.el: No `grep-find-command' command available. Press RET.")
555 (list nil)))) 555 (list nil))))
556 (when (and grep-find-command command-args) 556 (when command-args
557 (let ((null-device nil)) ; see grep 557 (let ((null-device nil)) ; see grep
558 (grep command-args)))) 558 (grep command-args))))
559 559
diff --git a/lisp/shell.el b/lisp/shell.el
index 71b5862feb6..bfa9565e8d4 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -150,7 +150,7 @@ This is a fine thing to set in your `.emacs' file."
150 :group 'shell) 150 :group 'shell)
151 151
152(defcustom shell-completion-fignore nil 152(defcustom shell-completion-fignore nil
153 "*List of suffixes to be disregarded during file/command completion. 153 "List of suffixes to be disregarded during file/command completion.
154This variable is used to initialize `comint-completion-fignore' in the shell 154This variable is used to initialize `comint-completion-fignore' in the shell
155buffer. The default is nil, for compatibility with most shells. 155buffer. The default is nil, for compatibility with most shells.
156Some people like (\"~\" \"#\" \"%\"). 156Some people like (\"~\" \"#\" \"%\").
@@ -199,19 +199,19 @@ shell buffer.
199This is a fine thing to set in your `.emacs' file.") 199This is a fine thing to set in your `.emacs' file.")
200 200
201(defcustom shell-command-regexp "[^;&|\n]+" 201(defcustom shell-command-regexp "[^;&|\n]+"
202 "*Regexp to match a single command within a pipeline. 202 "Regexp to match a single command within a pipeline.
203This is used for directory tracking and does not do a perfect job." 203This is used for directory tracking and does not do a perfect job."
204 :type 'regexp 204 :type 'regexp
205 :group 'shell) 205 :group 'shell)
206 206
207(defcustom shell-command-separator-regexp "[;&|\n \t]*" 207(defcustom shell-command-separator-regexp "[;&|\n \t]*"
208 "*Regexp to match a single command within a pipeline. 208 "Regexp to match a single command within a pipeline.
209This is used for directory tracking and does not do a perfect job." 209This is used for directory tracking and does not do a perfect job."
210 :type 'regexp 210 :type 'regexp
211 :group 'shell) 211 :group 'shell)
212 212
213(defcustom shell-completion-execonly t 213(defcustom shell-completion-execonly t
214 "*If non-nil, use executable files only for completion candidates. 214 "If non-nil, use executable files only for completion candidates.
215This mirrors the optional behavior of tcsh. 215This mirrors the optional behavior of tcsh.
216 216
217Detecting executability of files may slow command completion considerably." 217Detecting executability of files may slow command completion considerably."
@@ -219,35 +219,35 @@ Detecting executability of files may slow command completion considerably."
219 :group 'shell) 219 :group 'shell)
220 220
221(defcustom shell-popd-regexp "popd" 221(defcustom shell-popd-regexp "popd"
222 "*Regexp to match subshell commands equivalent to popd." 222 "Regexp to match subshell commands equivalent to popd."
223 :type 'regexp 223 :type 'regexp
224 :group 'shell-directories) 224 :group 'shell-directories)
225 225
226(defcustom shell-pushd-regexp "pushd" 226(defcustom shell-pushd-regexp "pushd"
227 "*Regexp to match subshell commands equivalent to pushd." 227 "Regexp to match subshell commands equivalent to pushd."
228 :type 'regexp 228 :type 'regexp
229 :group 'shell-directories) 229 :group 'shell-directories)
230 230
231(defcustom shell-pushd-tohome nil 231(defcustom shell-pushd-tohome nil
232 "*If non-nil, make pushd with no arg behave as \"pushd ~\" (like cd). 232 "If non-nil, make pushd with no arg behave as \"pushd ~\" (like cd).
233This mirrors the optional behavior of tcsh." 233This mirrors the optional behavior of tcsh."
234 :type 'boolean 234 :type 'boolean
235 :group 'shell-directories) 235 :group 'shell-directories)
236 236
237(defcustom shell-pushd-dextract nil 237(defcustom shell-pushd-dextract nil
238 "*If non-nil, make \"pushd +n\" pop the nth dir to the stack top. 238 "If non-nil, make \"pushd +n\" pop the nth dir to the stack top.
239This mirrors the optional behavior of tcsh." 239This mirrors the optional behavior of tcsh."
240 :type 'boolean 240 :type 'boolean
241 :group 'shell-directories) 241 :group 'shell-directories)
242 242
243(defcustom shell-pushd-dunique nil 243(defcustom shell-pushd-dunique nil
244 "*If non-nil, make pushd only add unique directories to the stack. 244 "If non-nil, make pushd only add unique directories to the stack.
245This mirrors the optional behavior of tcsh." 245This mirrors the optional behavior of tcsh."
246 :type 'boolean 246 :type 'boolean
247 :group 'shell-directories) 247 :group 'shell-directories)
248 248
249(defcustom shell-cd-regexp "cd" 249(defcustom shell-cd-regexp "cd"
250 "*Regexp to match subshell commands equivalent to cd." 250 "Regexp to match subshell commands equivalent to cd."
251 :type 'regexp 251 :type 'regexp
252 :group 'shell-directories) 252 :group 'shell-directories)
253 253
@@ -256,19 +256,19 @@ This mirrors the optional behavior of tcsh."
256 ; NetWare allows the five chars between upper and lower alphabetics. 256 ; NetWare allows the five chars between upper and lower alphabetics.
257 "[]a-zA-Z^_`\\[\\\\]:" 257 "[]a-zA-Z^_`\\[\\\\]:"
258 nil) 258 nil)
259 "*If non-nil, is regexp used to track drive changes." 259 "If non-nil, is regexp used to track drive changes."
260 :type '(choice regexp 260 :type '(choice regexp
261 (const nil)) 261 (const nil))
262 :group 'shell-directories) 262 :group 'shell-directories)
263 263
264(defcustom shell-dirtrack-verbose t 264(defcustom shell-dirtrack-verbose t
265 "*If non-nil, show the directory stack following directory change. 265 "If non-nil, show the directory stack following directory change.
266This is effective only if directory tracking is enabled." 266This is effective only if directory tracking is enabled."
267 :type 'boolean 267 :type 'boolean
268 :group 'shell-directories) 268 :group 'shell-directories)
269 269
270(defcustom explicit-shell-file-name nil 270(defcustom explicit-shell-file-name nil
271 "*If non-nil, is file name to use for explicitly requested inferior shell." 271 "If non-nil, is file name to use for explicitly requested inferior shell."
272 :type '(choice (const :tag "None" nil) file) 272 :type '(choice (const :tag "None" nil) file)
273 :group 'shell) 273 :group 'shell)
274 274
@@ -278,7 +278,7 @@ This is effective only if directory tracking is enabled."
278 ;; than us about what terminal modes to use. 278 ;; than us about what terminal modes to use.
279 '("-i" "-T") 279 '("-i" "-T")
280 '("-i")) 280 '("-i"))
281 "*Args passed to inferior shell by M-x shell, if the shell is csh. 281 "Args passed to inferior shell by \\[shell], if the shell is csh.
282Value is a list of strings, which may be nil." 282Value is a list of strings, which may be nil."
283 :type '(repeat (string :tag "Argument")) 283 :type '(repeat (string :tag "Argument"))
284 :group 'shell) 284 :group 'shell)
@@ -296,13 +296,13 @@ Value is a list of strings, which may be nil."
296 (shell-command-to-string (concat prog " --noediting")))) 296 (shell-command-to-string (concat prog " --noediting"))))
297 '("-i") 297 '("-i")
298 '("--noediting" "-i"))) 298 '("--noediting" "-i")))
299 "*Args passed to inferior shell by M-x shell, if the shell is bash. 299 "Args passed to inferior shell by \\[shell], if the shell is bash.
300Value is a list of strings, which may be nil." 300Value is a list of strings, which may be nil."
301 :type '(repeat (string :tag "Argument")) 301 :type '(repeat (string :tag "Argument"))
302 :group 'shell) 302 :group 'shell)
303 303
304(defcustom shell-input-autoexpand 'history 304(defcustom shell-input-autoexpand 'history
305 "*If non-nil, expand input command history references on completion. 305 "If non-nil, expand input command history references on completion.
306This mirrors the optional behavior of tcsh (its autoexpand and histlit). 306This mirrors the optional behavior of tcsh (its autoexpand and histlit).
307 307
308If the value is `input', then the expansion is seen on input. 308If the value is `input', then the expansion is seen on input.
@@ -433,9 +433,7 @@ buffer."
433 (setq shell-dirstack nil) 433 (setq shell-dirstack nil)
434 (make-local-variable 'shell-last-dir) 434 (make-local-variable 'shell-last-dir)
435 (setq shell-last-dir nil) 435 (setq shell-last-dir nil)
436 (make-local-variable 'shell-dirtrackp) 436 (shell-dirtrack-mode 1)
437 (setq shell-dirtrackp t)
438 (add-hook 'comint-input-filter-functions 'shell-directory-tracker nil t)
439 (setq comint-input-autoexpand shell-input-autoexpand) 437 (setq comint-input-autoexpand shell-input-autoexpand)
440 ;; This is not really correct, since the shell buffer does not really 438 ;; This is not really correct, since the shell buffer does not really
441 ;; edit this directory. But it is useful in the buffer list and menus. 439 ;; edit this directory. But it is useful in the buffer list and menus.
@@ -558,48 +556,48 @@ Otherwise, one argument `-i' is passed to the shell.
558 (shell-mode))) 556 (shell-mode)))
559 buffer) 557 buffer)
560 558
561;;; Don't do this when shell.el is loaded, only while dumping. 559;; Don't do this when shell.el is loaded, only while dumping.
562;;;###autoload (add-hook 'same-window-buffer-names "*shell*") 560;;;###autoload (add-hook 'same-window-buffer-names "*shell*")
563 561
564;;; Directory tracking 562;;; Directory tracking
565;;; 563;;
566;;; This code provides the shell mode input sentinel 564;; This code provides the shell mode input sentinel
567;;; SHELL-DIRECTORY-TRACKER 565;; SHELL-DIRECTORY-TRACKER
568;;; that tracks cd, pushd, and popd commands issued to the shell, and 566;; that tracks cd, pushd, and popd commands issued to the shell, and
569;;; changes the current directory of the shell buffer accordingly. 567;; changes the current directory of the shell buffer accordingly.
570;;; 568;;
571;;; This is basically a fragile hack, although it's more accurate than 569;; This is basically a fragile hack, although it's more accurate than
572;;; the version in Emacs 18's shell.el. It has the following failings: 570;; the version in Emacs 18's shell.el. It has the following failings:
573;;; 1. It doesn't know about the cdpath shell variable. 571;; 1. It doesn't know about the cdpath shell variable.
574;;; 2. It cannot infallibly deal with command sequences, though it does well 572;; 2. It cannot infallibly deal with command sequences, though it does well
575;;; with these and with ignoring commands forked in another shell with ()s. 573;; with these and with ignoring commands forked in another shell with ()s.
576;;; 3. More generally, any complex command is going to throw it. Otherwise, 574;; 3. More generally, any complex command is going to throw it. Otherwise,
577;;; you'd have to build an entire shell interpreter in Emacs Lisp. Failing 575;; you'd have to build an entire shell interpreter in Emacs Lisp. Failing
578;;; that, there's no way to catch shell commands where cd's are buried 576;; that, there's no way to catch shell commands where cd's are buried
579;;; inside conditional expressions, aliases, and so forth. 577;; inside conditional expressions, aliases, and so forth.
580;;; 578;;
581;;; The whole approach is a crock. Shell aliases mess it up. File sourcing 579;; The whole approach is a crock. Shell aliases mess it up. File sourcing
582;;; messes it up. You run other processes under the shell; these each have 580;; messes it up. You run other processes under the shell; these each have
583;;; separate working directories, and some have commands for manipulating 581;; separate working directories, and some have commands for manipulating
584;;; their w.d.'s (e.g., the lcd command in ftp). Some of these programs have 582;; their w.d.'s (e.g., the lcd command in ftp). Some of these programs have
585;;; commands that do *not* affect the current w.d. at all, but look like they 583;; commands that do *not* affect the current w.d. at all, but look like they
586;;; do (e.g., the cd command in ftp). In shells that allow you job 584;; do (e.g., the cd command in ftp). In shells that allow you job
587;;; control, you can switch between jobs, all having different w.d.'s. So 585;; control, you can switch between jobs, all having different w.d.'s. So
588;;; simply saying %3 can shift your w.d.. 586;; simply saying %3 can shift your w.d..
589;;; 587;;
590;;; The solution is to relax, not stress out about it, and settle for 588;; The solution is to relax, not stress out about it, and settle for
591;;; a hack that works pretty well in typical circumstances. Remember 589;; a hack that works pretty well in typical circumstances. Remember
592;;; that a half-assed solution is more in keeping with the spirit of Unix, 590;; that a half-assed solution is more in keeping with the spirit of Unix,
593;;; anyway. Blech. 591;; anyway. Blech.
594;;; 592;;
595;;; One good hack not implemented here for users of programmable shells 593;; One good hack not implemented here for users of programmable shells
596;;; is to program up the shell w.d. manipulation commands to output 594;; is to program up the shell w.d. manipulation commands to output
597;;; a coded command sequence to the tty. Something like 595;; a coded command sequence to the tty. Something like
598;;; ESC | <cwd> | 596;; ESC | <cwd> |
599;;; where <cwd> is the new current working directory. Then trash the 597;; where <cwd> is the new current working directory. Then trash the
600;;; directory tracking machinery currently used in this package, and 598;; directory tracking machinery currently used in this package, and
601;;; replace it with a process filter that watches for and strips out 599;; replace it with a process filter that watches for and strips out
602;;; these messages. 600;; these messages.
603 601
604(defun shell-directory-tracker (str) 602(defun shell-directory-tracker (str)
605 "Tracks cd, pushd and popd commands issued to the shell. 603 "Tracks cd, pushd and popd commands issued to the shell.
@@ -607,8 +605,8 @@ This function is called on each input passed to the shell.
607It watches for cd, pushd and popd commands and sets the buffer's 605It watches for cd, pushd and popd commands and sets the buffer's
608default directory to track these commands. 606default directory to track these commands.
609 607
610You may toggle this tracking on and off with M-x dirtrack-mode. 608You may toggle this tracking on and off with \\[dirtrack-mode].
611If Emacs gets confused, you can resync with the shell with M-x dirs. 609If Emacs gets confused, you can resync with the shell with \\[dirs].
612 610
613See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp', 611See variables `shell-cd-regexp', `shell-chdrive-regexp', `shell-pushd-regexp',
614and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract', 612and `shell-popd-regexp', while `shell-pushd-tohome', `shell-pushd-dextract',
@@ -677,7 +675,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
677 (setq string (replace-match "" nil nil string))))) 675 (setq string (replace-match "" nil nil string)))))
678 string))) 676 string)))
679 677
680;;; popd [+n] 678;; popd [+n]
681(defun shell-process-popd (arg) 679(defun shell-process-popd (arg)
682 (let ((num (or (shell-extract-num arg) 0))) 680 (let ((num (or (shell-extract-num arg) 0)))
683 (cond ((and num (= num 0) shell-dirstack) 681 (cond ((and num (= num 0) shell-dirstack)
@@ -703,7 +701,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
703 ;; For relative name we assume default-directory already has the prefix. 701 ;; For relative name we assume default-directory already has the prefix.
704 (expand-file-name dir)))) 702 (expand-file-name dir))))
705 703
706;;; cd [dir] 704;; cd [dir]
707(defun shell-process-cd (arg) 705(defun shell-process-cd (arg)
708 (let ((new-dir (cond ((zerop (length arg)) (concat comint-file-name-prefix 706 (let ((new-dir (cond ((zerop (length arg)) (concat comint-file-name-prefix
709 "~")) 707 "~"))
@@ -713,7 +711,7 @@ Environment variables are expanded, see function `substitute-in-file-name'."
713 (shell-cd new-dir) 711 (shell-cd new-dir)
714 (shell-dirstack-message))) 712 (shell-dirstack-message)))
715 713
716;;; pushd [+n | dir] 714;; pushd [+n | dir]
717(defun shell-process-pushd (arg) 715(defun shell-process-pushd (arg)
718 (let ((num (shell-extract-num arg))) 716 (let ((num (shell-extract-num arg)))
719 (cond ((zerop (length arg)) 717 (cond ((zerop (length arg))
@@ -762,26 +760,25 @@ Environment variables are expanded, see function `substitute-in-file-name'."
762 (and (string-match "^\\+[1-9][0-9]*$" str) 760 (and (string-match "^\\+[1-9][0-9]*$" str)
763 (string-to-number str))) 761 (string-to-number str)))
764 762
765 763(defvaralias 'shell-dirtrack-mode 'shell-dirtrackp)
766(defun shell-dirtrack-mode () 764(define-minor-mode shell-dirtrack-mode
767 "Turn directory tracking on and off in a shell buffer." 765 "Turn directory tracking on and off in a shell buffer."
768 (interactive) 766 nil nil nil
769 (if (setq shell-dirtrackp (not shell-dirtrackp)) 767 (setq list-buffers-directory (if shell-dirtrack-mode default-directory))
770 (setq list-buffers-directory default-directory) 768 (if shell-dirtrack-mode
771 (setq list-buffers-directory nil)) 769 (add-hook 'comint-input-filter-functions 'shell-directory-tracker nil t)
772 (message "Directory tracking %s" (if shell-dirtrackp "ON" "OFF"))) 770 (remove-hook 'comint-input-filter-functions 'shell-directory-tracker t)))
773 771
774;;; For your typing convenience: 772;; For your typing convenience:
775(defalias 'shell-dirtrack-toggle 'shell-dirtrack-mode) 773(defalias 'shell-dirtrack-toggle 'shell-dirtrack-mode) ;??Convenience??
776(defalias 'dirtrack-toggle 'shell-dirtrack-mode) 774(defalias 'dirtrack-toggle 'shell-dirtrack-mode)
777(defalias 'dirtrack-mode 'shell-dirtrack-mode) 775(defalias 'dirtrack-mode 'shell-dirtrack-mode)
778 776
779(defun shell-cd (dir) 777(defun shell-cd (dir)
780 "Do normal `cd' to DIR, and set `list-buffers-directory'." 778 "Do normal `cd' to DIR, and set `list-buffers-directory'."
779 (cd dir)
781 (if shell-dirtrackp 780 (if shell-dirtrackp
782 (setq list-buffers-directory (file-name-as-directory 781 (setq list-buffers-directory default-directory)))
783 (expand-file-name dir))))
784 (cd dir))
785 782
786(defun shell-resync-dirs () 783(defun shell-resync-dirs ()
787 "Resync the buffer's idea of the current directory stack. 784 "Resync the buffer's idea of the current directory stack.
@@ -841,15 +838,15 @@ command again."
841 (shell-dirstack-message)) 838 (shell-dirstack-message))
842 (error (message "Couldn't cd"))))))) 839 (error (message "Couldn't cd")))))))
843 840
844;;; For your typing convenience: 841;; For your typing convenience:
845(defalias 'dirs 'shell-resync-dirs) 842(defalias 'dirs 'shell-resync-dirs)
846 843
847 844
848;;; Show the current dirstack on the message line. 845;; Show the current dirstack on the message line.
849;;; Pretty up dirs a bit by changing "/usr/jqr/foo" to "~/foo". 846;; Pretty up dirs a bit by changing "/usr/jqr/foo" to "~/foo".
850;;; (This isn't necessary if the dirlisting is generated with a simple "dirs".) 847;; (This isn't necessary if the dirlisting is generated with a simple "dirs".)
851;;; All the commands that mung the buffer's dirstack finish by calling 848;; All the commands that mung the buffer's dirstack finish by calling
852;;; this guy. 849;; this guy.
853(defun shell-dirstack-message () 850(defun shell-dirstack-message ()
854 (when shell-dirtrack-verbose 851 (when shell-dirtrack-verbose
855 (let* ((msg "") 852 (let* ((msg "")
@@ -1076,5 +1073,5 @@ Returns t if successful."
1076 1073
1077(provide 'shell) 1074(provide 'shell)
1078 1075
1079;;; arch-tag: bcb5f12a-c1f4-4aea-a809-2504bd5bd797 1076;; arch-tag: bcb5f12a-c1f4-4aea-a809-2504bd5bd797
1080;;; shell.el ends here 1077;;; shell.el ends here
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 3e8abb6c0d0..88b91b74aa4 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1585,17 +1585,6 @@ in `selection-converter-alist', which see."
1585 (ash (lsh result extended-sign-len) (- extended-sign-len)) 1585 (ash (lsh result extended-sign-len) (- extended-sign-len))
1586 result))) 1586 result)))
1587 1587
1588(defun mac-bytes-to-digits (bytes &optional from to)
1589 (or from (setq from 0))
1590 (or to (setq to (length bytes)))
1591 (let ((len (- to from))
1592 (val 0.0))
1593 (dotimes (i len)
1594 (setq val (+ (* val 256.0)
1595 (aref bytes (+ from (if (eq (byteorder) ?B) i
1596 (- len i 1)))))))
1597 (format "%.0f" val)))
1598
1599(defun mac-ae-selection-range (ae) 1588(defun mac-ae-selection-range (ae)
1600;; #pragma options align=mac68k 1589;; #pragma options align=mac68k
1601;; typedef struct SelectionRange { 1590;; typedef struct SelectionRange {
@@ -1693,7 +1682,8 @@ modifiers, it changes global tool-bar visibility setting."
1693 (if (and modifiers (not (string= modifiers "\000\000\000\000"))) 1682 (if (and modifiers (not (string= modifiers "\000\000\000\000")))
1694 ;; Globally toggle tool-bar-mode if some modifier key is pressed. 1683 ;; Globally toggle tool-bar-mode if some modifier key is pressed.
1695 (tool-bar-mode) 1684 (tool-bar-mode)
1696 (let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae)))) 1685 (let ((window-id
1686 (mac-coerce-ae-data "long" (cdr (mac-ae-parameter ae)) "TEXT"))
1697 (rest (frame-list)) 1687 (rest (frame-list))
1698 frame) 1688 frame)
1699 (while (and (null frame) rest) 1689 (while (and (null frame) rest)