diff options
| author | Chong Yidong | 2010-07-16 11:42:15 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-07-16 11:42:15 -0400 |
| commit | fea9cabd275c3d5809b824a6e4a1446441a6793e (patch) | |
| tree | a5eb69edf85fe28f6b4d5bbc8e3c2c3cfc3d0d37 /lisp | |
| parent | 7e4289ad2bbd9f8ed18902f652d3f07380b227bf (diff) | |
| parent | f253ef6a8e0dd71cf9fd58e3d9407549d30e091d (diff) | |
| download | emacs-fea9cabd275c3d5809b824a6e4a1446441a6793e.tar.gz emacs-fea9cabd275c3d5809b824a6e4a1446441a6793e.zip | |
Merge changes from emacs-23 branch.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 31 | ||||
| -rw-r--r-- | lisp/calendar/cal-tex.el | 80 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 4 | ||||
| -rw-r--r-- | lisp/mail/rmailmm.el | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 7 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 17 | ||||
| -rw-r--r-- | lisp/xt-mouse.el | 4 |
7 files changed, 99 insertions, 48 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 199c8243188..f0ea29a5d89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2010-07-16 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * vc.el (vc-coding-system-inherit-eol): New defvar. | ||
| 4 | (vc-coding-system-for-diff): Use it to decide whether to inherit | ||
| 5 | from the file the EOL format for reading the diffs of that file. | ||
| 6 | (Bug#4451) | ||
| 7 | |||
| 8 | 2010-07-16 Eli Zaretskii <eliz@gnu.org> | ||
| 9 | |||
| 10 | * mail/rmailmm.el (rmail-mime-save): Make the temp buffer | ||
| 11 | unibyte, so compressed attachments are not compressed again. | ||
| 12 | |||
| 1 | 2010-07-16 Michael Albinus <michael.albinus@gmx.de> | 13 | 2010-07-16 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 14 | ||
| 3 | * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired | 15 | * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired |
| @@ -22,6 +34,11 @@ | |||
| 22 | * bookmark.el (bookmark-load-hook): Fix doc string as suggested | 34 | * bookmark.el (bookmark-load-hook): Fix doc string as suggested |
| 23 | by Drew Adams (Bug#5504). | 35 | by Drew Adams (Bug#5504). |
| 24 | 36 | ||
| 37 | 2010-07-14 Jan Djärv <jan.h.d@swipnet.se> | ||
| 38 | |||
| 39 | * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127 | ||
| 40 | now that unicode is used (Bug#6594). | ||
| 41 | |||
| 25 | 2010-07-14 Chong Yidong <cyd@stupidchicken.com> | 42 | 2010-07-14 Chong Yidong <cyd@stupidchicken.com> |
| 26 | 43 | ||
| 27 | * term/x-win.el (x-select-enable-clipboard): Default to t. | 44 | * term/x-win.el (x-select-enable-clipboard): Default to t. |
| @@ -120,6 +137,20 @@ | |||
| 120 | * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass | 137 | * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass |
| 121 | empty argument to gvfs-copy. | 138 | empty argument to gvfs-copy. |
| 122 | 139 | ||
| 140 | 2010-07-10 Glenn Morris <rgm@gnu.org> | ||
| 141 | |||
| 142 | * calendar/calendar.el (calendar-week-end-day): New function. | ||
| 143 | * calendar/cal-tex.el (cal-tex-cursor-month): Remove unused vars. | ||
| 144 | Respect calendar-week-start-day. (Bug#6606) | ||
| 145 | (cal-tex-insert-day-names, cal-tex-insert-blank-days) | ||
| 146 | (cal-tex-insert-blank-days-at-end): Respect calendar-week-start-day. | ||
| 147 | (cal-tex-first-blank-p, cal-tex-last-blank-p): Simplify, and | ||
| 148 | respect calendar-week-start-day. | ||
| 149 | |||
| 150 | 2010-07-10 Chong Yidong <cyd@stupidchicken.com> | ||
| 151 | |||
| 152 | * simple.el (use-region-p): Doc fix (Bug#6607). | ||
| 153 | |||
| 123 | 2010-07-10 Aleksei Gusev <aleksei.gusev@gmail.com> (tiny change) | 154 | 2010-07-10 Aleksei Gusev <aleksei.gusev@gmail.com> (tiny change) |
| 124 | 155 | ||
| 125 | * progmodes/compile.el (compilation-error-regexp-alist-alist): Add | 156 | * progmodes/compile.el (compilation-error-regexp-alist-alist): Add |
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index bbddc1ff38c..46fb0869787 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX | 1 | ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 3 | ;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2009, 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Steve Fisk <fisk@bowdoin.edu> | 6 | ;; Author: Steve Fisk <fisk@bowdoin.edu> |
| 7 | ;; Edward M. Reingold <reingold@cs.uiuc.edu> | 7 | ;; Edward M. Reingold <reingold@cs.uiuc.edu> |
| @@ -507,6 +507,7 @@ indicates a buffer position to use instead of point." | |||
| 507 | (year (calendar-extract-year date)) | 507 | (year (calendar-extract-year date)) |
| 508 | (end-month month) | 508 | (end-month month) |
| 509 | (end-year year) | 509 | (end-year year) |
| 510 | ;; FIXME -landscape sets cal-tex-which-days? | ||
| 510 | (d1 (calendar-absolute-from-gregorian (list month 1 year))) | 511 | (d1 (calendar-absolute-from-gregorian (list month 1 year))) |
| 511 | (d2 (progn | 512 | (d2 (progn |
| 512 | (calendar-increment-month end-month end-year (1- n)) | 513 | (calendar-increment-month end-month end-year (1- n)) |
| @@ -515,8 +516,7 @@ indicates a buffer position to use instead of point." | |||
| 515 | (calendar-last-day-of-month end-month end-year) | 516 | (calendar-last-day-of-month end-month end-year) |
| 516 | end-year)))) | 517 | end-year)))) |
| 517 | (diary-list (if cal-tex-diary (cal-tex-list-diary-entries d1 d2))) | 518 | (diary-list (if cal-tex-diary (cal-tex-list-diary-entries d1 d2))) |
| 518 | (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2))) | 519 | (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2)))) |
| 519 | other-month other-year) | ||
| 520 | (cal-tex-insert-preamble (cal-tex-number-weeks month year n) nil "12pt") | 520 | (cal-tex-insert-preamble (cal-tex-number-weeks month year n) nil "12pt") |
| 521 | (if (> n 1) | 521 | (if (> n 1) |
| 522 | (cal-tex-cmd cal-tex-cal-multi-month) | 522 | (cal-tex-cmd cal-tex-cal-multi-month) |
| @@ -526,14 +526,12 @@ indicates a buffer position to use instead of point." | |||
| 526 | (cal-tex-nl ".2cm") | 526 | (cal-tex-nl ".2cm") |
| 527 | (cal-tex-insert-blank-days month year cal-tex-day-prefix) | 527 | (cal-tex-insert-blank-days month year cal-tex-day-prefix) |
| 528 | (dotimes (idummy n) | 528 | (dotimes (idummy n) |
| 529 | (setq other-month month | ||
| 530 | other-year year) | ||
| 531 | (cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix) | 529 | (cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix) |
| 532 | (when (= 6 (mod (calendar-absolute-from-gregorian | 530 | (when (= (calendar-week-end-day) |
| 533 | (list month | 531 | (calendar-day-of-week |
| 534 | (calendar-last-day-of-month month year) | 532 | (list month |
| 535 | year)) | 533 | (calendar-last-day-of-month month year) |
| 536 | 7)) ; last day of month was Saturday | 534 | year))) ; last day of month was last day of week |
| 537 | (cal-tex-hfill) | 535 | (cal-tex-hfill) |
| 538 | (cal-tex-nl)) | 536 | (cal-tex-nl)) |
| 539 | (calendar-increment-month month year 1)) | 537 | (calendar-increment-month month year 1)) |
| @@ -570,13 +568,14 @@ are included. Each day is formatted using format DAY-FORMAT." | |||
| 570 | 568 | ||
| 571 | (defun cal-tex-insert-day-names () | 569 | (defun cal-tex-insert-day-names () |
| 572 | "Insert the names of the days at top of a monthly calendar." | 570 | "Insert the names of the days at top of a monthly calendar." |
| 573 | (dotimes (i 7) | 571 | (let (j) |
| 574 | (if (memq i cal-tex-which-days) | 572 | (dotimes (i 7) |
| 575 | (insert (format cal-tex-day-name-format | 573 | (if (memq (setq j (mod (+ calendar-week-start-day i) 7)) |
| 576 | (cal-tex-LaTeXify-string | 574 | cal-tex-which-days) |
| 577 | (aref calendar-day-name-array | 575 | (insert (format cal-tex-day-name-format |
| 578 | (mod (+ calendar-week-start-day i) 7)))))) | 576 | (cal-tex-LaTeXify-string |
| 579 | (cal-tex-comment))) | 577 | (aref calendar-day-name-array j))))) |
| 578 | (cal-tex-comment)))) | ||
| 580 | 579 | ||
| 581 | (defun cal-tex-insert-month-header (n month year end-month end-year) | 580 | (defun cal-tex-insert-month-header (n month year end-month end-year) |
| 582 | "Create a title for a calendar. | 581 | "Create a title for a calendar. |
| @@ -603,7 +602,7 @@ blank, no days are inserted." | |||
| 603 | calendar-week-start-day) | 602 | calendar-week-start-day) |
| 604 | 7))) | 603 | 7))) |
| 605 | (dotimes (i blank-days) | 604 | (dotimes (i blank-days) |
| 606 | (if (memq i cal-tex-which-days) | 605 | (if (memq (mod (+ calendar-week-start-day i) 7) cal-tex-which-days) |
| 607 | (insert (format day-format " " " ") "{}{}{}{}%\n")))))) | 606 | (insert (format day-format " " " ") "{}{}{}{}%\n")))))) |
| 608 | 607 | ||
| 609 | (defun cal-tex-insert-blank-days-at-end (month year day-format) | 608 | (defun cal-tex-insert-blank-days-at-end (month year day-format) |
| @@ -619,38 +618,37 @@ The entry is formatted using DAY-FORMAT." | |||
| 619 | 7)) | 618 | 7)) |
| 620 | (i blank-days)) | 619 | (i blank-days)) |
| 621 | (while (<= (setq i (1+ i)) 6) | 620 | (while (<= (setq i (1+ i)) 6) |
| 622 | (if (memq i cal-tex-which-days) | 621 | (if (memq (mod (+ calendar-week-start-day i) 7) cal-tex-which-days) |
| 623 | (insert (format day-format "" "") "{}{}{}{}%\n")))))) | 622 | (insert (format day-format "" "") "{}{}{}{}%\n")))))) |
| 624 | 623 | ||
| 625 | (defun cal-tex-first-blank-p (month year) | 624 | (defun cal-tex-first-blank-p (month year) |
| 626 | "Determine if any days of the first week will be printed. | 625 | "Determine if any days of the first week will be printed. |
| 627 | Return t if there will there be any days of the first week printed | 626 | Return t if there will there be any days of the first week printed |
| 628 | in the calendar starting in MONTH YEAR." | 627 | in the calendar starting in MONTH YEAR." |
| 629 | (let (any-days the-saturday) ; the day of week of 1st Saturday | 628 | ;; Check days 1-7 of the month, until we find the last day of the week. |
| 630 | (dotimes (i 7) | 629 | (catch 'found |
| 631 | (if (= 6 (calendar-day-of-week (list month (1+ i) year))) | 630 | (let (dow) |
| 632 | (setq the-saturday (1+ i)))) | 631 | (dotimes (i 7) |
| 633 | (dotimes (i the-saturday) | 632 | (if (memq (setq dow (calendar-day-of-week (list month (1+ i) year))) |
| 634 | (if (memq (calendar-day-of-week (list month (1+ i) year)) | 633 | cal-tex-which-days) |
| 635 | cal-tex-which-days) | 634 | (throw 'found t) |
| 636 | (setq any-days t))) | 635 | (if (= dow (calendar-week-end-day)) (throw 'found nil))))))) |
| 637 | any-days)) | ||
| 638 | 636 | ||
| 639 | (defun cal-tex-last-blank-p (month year) | 637 | (defun cal-tex-last-blank-p (month year) |
| 640 | "Determine if any days of the last week will be printed. | 638 | "Determine if any days of the last week will be printed. |
| 641 | Return t if there will there be any days of the last week printed | 639 | Return t if there will there be any days of the last week printed |
| 642 | in the calendar starting in MONTH YEAR." | 640 | in the calendar starting in MONTH YEAR." |
| 643 | (let* ((last-day (calendar-last-day-of-month month year)) | 641 | ;; Check backwards from the last day of the month, until we find the |
| 644 | (i (- last-day 7)) | 642 | ;; start of the last week in the month. |
| 645 | any-days the-sunday) ; the day of week of last Sunday | 643 | (catch 'found |
| 646 | (while (<= (setq i (1+ i)) last-day) | 644 | (let ((last-day (calendar-last-day-of-month month year)) |
| 647 | (if (zerop (calendar-day-of-week (list month i year))) | 645 | day dow) |
| 648 | (setq the-sunday i))) | 646 | (dotimes (i 7) |
| 649 | (setq i (1- the-sunday)) | 647 | (if (memq (setq dow (calendar-day-of-week |
| 650 | (while (<= (setq i (1+ i)) last-day) | 648 | (list month (- last-day i) year))) |
| 651 | (if (memq (calendar-day-of-week (list month i year)) cal-tex-which-days) | 649 | cal-tex-which-days) |
| 652 | (setq any-days t))) | 650 | (throw 'found t) |
| 653 | any-days)) | 651 | (if (= dow calendar-week-start-day) (throw 'found nil))))))) |
| 654 | 652 | ||
| 655 | (defun cal-tex-number-weeks (month year n) | 653 | (defun cal-tex-number-weeks (month year n) |
| 656 | "Determine the number of weeks in a range of dates. | 654 | "Determine the number of weeks in a range of dates. |
| @@ -1499,7 +1497,7 @@ Optional string COLSEP gives the column separation (default \"1mm\")." | |||
| 1499 | (- (calendar-day-of-week (list month 1 year)) | 1497 | (- (calendar-day-of-week (list month 1 year)) |
| 1500 | calendar-week-start-day) | 1498 | calendar-week-start-day) |
| 1501 | 7)) | 1499 | 7)) |
| 1502 | (last (calendar-last-day-of-month month year)) | 1500 | (last( calendar-last-day-of-month month year)) |
| 1503 | (str (concat "\\def\\" name "{\\hbox to" width "{%\n" | 1501 | (str (concat "\\def\\" name "{\\hbox to" width "{%\n" |
| 1504 | "\\vbox to" height "{%\n" | 1502 | "\\vbox to" height "{%\n" |
| 1505 | "\\vfil \\hbox to" width "{%\n" | 1503 | "\\vfil \\hbox to" width "{%\n" |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index d92942d003f..418f740bb83 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -2226,6 +2226,10 @@ DATE is a list of the form (month day year). A negative year is | |||
| 2226 | interpreted as BC; -1 being 1 BC, and so on." | 2226 | interpreted as BC; -1 being 1 BC, and so on." |
| 2227 | (mod (calendar-absolute-from-gregorian date) 7)) | 2227 | (mod (calendar-absolute-from-gregorian date) 7)) |
| 2228 | 2228 | ||
| 2229 | (defun calendar-week-end-day () | ||
| 2230 | "Return the index (0 for Sunday, etc.) of the last day of the week." | ||
| 2231 | (mod (+ calendar-week-start-day 6) 7)) | ||
| 2232 | |||
| 2229 | (defun calendar-unmark () | 2233 | (defun calendar-unmark () |
| 2230 | "Delete all diary/holiday marks/highlighting from the calendar." | 2234 | "Delete all diary/holiday marks/highlighting from the calendar." |
| 2231 | (interactive) | 2235 | (interactive) |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 415bc20cf50..e8ca11ee349 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -112,6 +112,10 @@ automatically display the image in the buffer." | |||
| 112 | (file-name-as-directory filename)))) | 112 | (file-name-as-directory filename)))) |
| 113 | (with-temp-buffer | 113 | (with-temp-buffer |
| 114 | (set-buffer-file-coding-system 'no-conversion) | 114 | (set-buffer-file-coding-system 'no-conversion) |
| 115 | ;; Needed e.g. by jka-compr, so if the attachment is a compressed | ||
| 116 | ;; file, the magic signature compares equal with the unibyte | ||
| 117 | ;; signature string recorded in jka-compr-compression-info-list. | ||
| 118 | (set-buffer-multibyte nil) | ||
| 115 | (insert data) | 119 | (insert data) |
| 116 | (write-region nil nil filename nil nil nil t)))) | 120 | (write-region nil nil filename nil nil nil t)))) |
| 117 | 121 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 20e109aaafe..939fbfe4e15 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3761,10 +3761,9 @@ point otherwise." | |||
| 3761 | This is used by commands that act specially on the region under | 3761 | This is used by commands that act specially on the region under |
| 3762 | Transient Mark mode. | 3762 | Transient Mark mode. |
| 3763 | 3763 | ||
| 3764 | The return value is t provided Transient Mark mode is enabled and | 3764 | The return value is t if Transient Mark mode is enabled and the |
| 3765 | the mark is active; and, when `use-empty-active-region' is | 3765 | mark is active; furthermore, if `use-empty-active-region' is nil, |
| 3766 | non-nil, provided the region is empty. Otherwise, the return | 3766 | the region must not be empty. Otherwise, the return value is nil. |
| 3767 | value is nil. | ||
| 3768 | 3767 | ||
| 3769 | For some commands, it may be appropriate to ignore the value of | 3768 | For some commands, it may be appropriate to ignore the value of |
| 3770 | `use-empty-active-region'; in that case, use `region-active-p'." | 3769 | `use-empty-active-region'; in that case, use `region-active-p'." |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 434c2a10e14..20e56bbd42f 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1437,6 +1437,16 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." | |||
| 1437 | ;; (vc-call-backend ',(vc-backend f) | 1437 | ;; (vc-call-backend ',(vc-backend f) |
| 1438 | ;; 'diff (list ',f) ',rev1 ',rev2)))))) | 1438 | ;; 'diff (list ',f) ',rev1 ',rev2)))))) |
| 1439 | 1439 | ||
| 1440 | (defvar vc-coding-system-inherit-eol t | ||
| 1441 | "When non-nil, inherit the EOL format for reading Diff output from the file. | ||
| 1442 | |||
| 1443 | Used in `vc-coding-system-for-diff' to determine the EOL format to use | ||
| 1444 | for reading Diff output for a file. If non-nil, the EOL format is | ||
| 1445 | inherited from the file itself. | ||
| 1446 | Set this variable to nil if your Diff tool might use a different | ||
| 1447 | EOL. Then Emacs will auto-detect the EOL format in Diff output, which | ||
| 1448 | gives better results.") ;; Cf. bug#4451. | ||
| 1449 | |||
| 1440 | (defun vc-coding-system-for-diff (file) | 1450 | (defun vc-coding-system-for-diff (file) |
| 1441 | "Return the coding system for reading diff output for FILE." | 1451 | "Return the coding system for reading diff output for FILE." |
| 1442 | (or coding-system-for-read | 1452 | (or coding-system-for-read |
| @@ -1444,7 +1454,12 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." | |||
| 1444 | ;; use the buffer's coding system | 1454 | ;; use the buffer's coding system |
| 1445 | (let ((buf (find-buffer-visiting file))) | 1455 | (let ((buf (find-buffer-visiting file))) |
| 1446 | (when buf (with-current-buffer buf | 1456 | (when buf (with-current-buffer buf |
| 1447 | buffer-file-coding-system))) | 1457 | (if vc-coding-system-inherit-eol |
| 1458 | buffer-file-coding-system | ||
| 1459 | ;; Don't inherit the EOL part of the coding-system, | ||
| 1460 | ;; because some Diff tools may choose to use | ||
| 1461 | ;; a different one. bug#4451. | ||
| 1462 | (coding-system-base buffer-file-coding-system))))) | ||
| 1448 | ;; otherwise, try to find one based on the file name | 1463 | ;; otherwise, try to find one based on the file name |
| 1449 | (car (find-operation-coding-system 'insert-file-contents file)) | 1464 | (car (find-operation-coding-system 'insert-file-contents file)) |
| 1450 | ;; and a final fallback | 1465 | ;; and a final fallback |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 2d38c6e827c..f802103fbd7 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -122,8 +122,8 @@ | |||
| 122 | ;; read xterm sequences above ascii 127 (#x7f) | 122 | ;; read xterm sequences above ascii 127 (#x7f) |
| 123 | (defun xterm-mouse-event-read () | 123 | (defun xterm-mouse-event-read () |
| 124 | (let ((c (read-char))) | 124 | (let ((c (read-char))) |
| 125 | (if (< c 0) | 125 | (if (> c #x3FFF80) |
| 126 | (+ c #x8000000 128) | 126 | (+ 128 (- c #x3FFF80)) |
| 127 | c))) | 127 | c))) |
| 128 | 128 | ||
| 129 | (defun xterm-mouse-truncate-wrap (f) | 129 | (defun xterm-mouse-truncate-wrap (f) |