aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-08-28 04:21:14 +0000
committerStefan Monnier2009-08-28 04:21:14 +0000
commitb56a5ae0fee0c641a3d874b4cce4c38813b941df (patch)
treeb6000f900c2d4666478338114086d182355ce1f2
parentde70529f66f8c7b2ccec01408a442165dd5aa9ea (diff)
downloademacs-b56a5ae0fee0c641a3d874b4cce4c38813b941df.tar.gz
emacs-b56a5ae0fee0c641a3d874b4cce4c38813b941df.zip
* mh-e/mh-comp.el (mh-send-letter):
* mail/sendmail.el (mail-recover-1): * international/mule-diag.el (describe-current-coding-system-briefly) (describe-current-coding-system): * international/mule-cmds.el (select-safe-coding-system) (select-message-coding-system) (set-language-environment-coding-systems, set-locale-environment): * hexl.el (hexl-insert-multibyte-char): * dos-w32.el (find-buffer-file-type-coding-system): * simple.el (what-cursor-position): Replace uses of default-buffer-file-coding-system with (default-value 'buffer-file-coding-system).
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/dos-w32.el6
-rw-r--r--lisp/hexl.el2
-rw-r--r--lisp/international/mule-cmds.el54
-rw-r--r--lisp/international/mule-diag.el11
-rw-r--r--lisp/mail/sendmail.el6
-rw-r--r--lisp/mh-e/ChangeLog5
-rw-r--r--lisp/mh-e/mh-comp.el4
-rw-r--r--lisp/simple.el2
9 files changed, 61 insertions, 41 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ea46d8ebd91..f69a3f287e3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,17 @@
12009-08-28 Stefan Monnier <monnier@iro.umontreal.ca> 12009-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * mail/sendmail.el (mail-recover-1):
4 * international/mule-diag.el (describe-current-coding-system-briefly)
5 (describe-current-coding-system):
6 * international/mule-cmds.el (select-safe-coding-system)
7 (select-message-coding-system)
8 (set-language-environment-coding-systems, set-locale-environment):
9 * hexl.el (hexl-insert-multibyte-char):
10 * dos-w32.el (find-buffer-file-type-coding-system):
11 * simple.el (what-cursor-position):
12 Replace uses of default-buffer-file-coding-system
13 with (default-value 'buffer-file-coding-system).
14
3 * emacs-lisp/edebug.el (edebug-display, edebug-outside-excursion): 15 * emacs-lisp/edebug.el (edebug-display, edebug-outside-excursion):
4 Replace uses of default-cursor-in-non-selected-windows 16 Replace uses of default-cursor-in-non-selected-windows
5 with (default-value 'cursor-in-non-selected-windows). 17 with (default-value 'cursor-in-non-selected-windows).
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index a910603f907..9bec5b7a1db 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -102,7 +102,7 @@ and whether the file exists:
102 If the match is nil (for dos-text): `undecided-dos' 102 If the match is nil (for dos-text): `undecided-dos'
103 Otherwise: 103 Otherwise:
104 If the file exists: `undecided' 104 If the file exists: `undecided'
105 If the file does not exist: default-buffer-file-coding-system 105 If the file does not exist default value of `buffer-file-coding-system'
106 106
107Note that the CAR of arguments to `insert-file-contents' operation could 107Note that the CAR of arguments to `insert-file-contents' operation could
108be a cons cell of the form \(FILENAME . BUFFER\), where BUFFER is a buffer 108be a cons cell of the form \(FILENAME . BUFFER\), where BUFFER is a buffer
@@ -169,8 +169,8 @@ set to the appropriate coding system, and the value of
169 (text '(undecided-dos . undecided-dos)) 169 (text '(undecided-dos . undecided-dos))
170 (undecided-unix '(undecided-unix . undecided-unix)) 170 (undecided-unix '(undecided-unix . undecided-unix))
171 (undecided '(undecided . undecided)) 171 (undecided '(undecided . undecided))
172 (t (cons default-buffer-file-coding-system 172 (t (cons (default-value 'buffer-file-coding-system)
173 default-buffer-file-coding-system)))) 173 (default-value 'buffer-file-coding-system)))))
174 ((eq op 'write-region) 174 ((eq op 'write-region)
175 (if buffer-file-coding-system 175 (if buffer-file-coding-system
176 (cons buffer-file-coding-system 176 (cons buffer-file-coding-system
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 2cdd449af38..d4aec1484ba 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -795,7 +795,7 @@ and their encoded form is inserted byte by byte."
795 (coding (if (or (null buffer-file-coding-system) 795 (coding (if (or (null buffer-file-coding-system)
796 ;; coding-system-type equals t means undecided. 796 ;; coding-system-type equals t means undecided.
797 (eq (coding-system-type buffer-file-coding-system) t)) 797 (eq (coding-system-type buffer-file-coding-system) t))
798 default-buffer-file-coding-system 798 (default-value 'buffer-file-coding-system)
799 buffer-file-coding-system))) 799 buffer-file-coding-system)))
800 (cond ((and (> ch 0) (< ch 256)) 800 (cond ((and (> ch 0) (< ch 256))
801 (hexl-insert-char ch num)) 801 (hexl-insert-char ch num))
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 4d4e5c87798..663c5769e35 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -813,7 +813,7 @@ between FROM and TO are shown in a popup window. Among them, the most
813proper one is suggested as the default. 813proper one is suggested as the default.
814 814
815The list of `buffer-file-coding-system' of the current buffer, the 815The list of `buffer-file-coding-system' of the current buffer, the
816`default-buffer-file-coding-system', and the most preferred coding 816default `buffer-file-coding-system', and the most preferred coding
817system (if it corresponds to a MIME charset) is treated as the 817system (if it corresponds to a MIME charset) is treated as the
818default coding system list. Among them, the first one that safely 818default coding system list. Among them, the first one that safely
819encodes the text is normally selected silently and returned without 819encodes the text is normally selected silently and returned without
@@ -829,7 +829,7 @@ Optional 3rd arg DEFAULT-CODING-SYSTEM specifies a coding system or a
829list of coding systems to be prepended to the default coding system 829list of coding systems to be prepended to the default coding system
830list. However, if DEFAULT-CODING-SYSTEM is a list and the first 830list. However, if DEFAULT-CODING-SYSTEM is a list and the first
831element is t, the cdr part is used as the default coding system list, 831element is t, the cdr part is used as the default coding system list,
832i.e. `buffer-file-coding-system', `default-buffer-file-coding-system', 832i.e. current `buffer-file-coding-system', default `buffer-file-coding-system',
833and the most preferred coding system are not used. 833and the most preferred coding system are not used.
834 834
835Optional 4th arg ACCEPT-DEFAULT-P, if non-nil, is a function to 835Optional 4th arg ACCEPT-DEFAULT-P, if non-nil, is a function to
@@ -908,16 +908,18 @@ It is highly recommended to fix it before writing to a file."
908 908
909 (unless (and buffer-file-coding-system-explicit 909 (unless (and buffer-file-coding-system-explicit
910 (cdr buffer-file-coding-system-explicit)) 910 (cdr buffer-file-coding-system-explicit))
911 ;; If default-buffer-file-coding-system is not nil nor undecided, 911 ;; If default buffer-file-coding-system is not nil nor undecided,
912 ;; append it to the defaults. 912 ;; append it to the defaults.
913 (if default-buffer-file-coding-system 913 (when (default-value 'buffer-file-coding-system)
914 (let ((base (coding-system-base default-buffer-file-coding-system))) 914 (let ((base (coding-system-base
915 (or (eq base 'undecided) 915 (default-value 'buffer-file-coding-system))))
916 (rassq base default-coding-system) 916 (or (eq base 'undecided)
917 (setq default-coding-system 917 (rassq base default-coding-system)
918 (append default-coding-system 918 (setq default-coding-system
919 (list (cons default-buffer-file-coding-system 919 (append default-coding-system
920 base))))))) 920 (list (cons (default-value
921 'buffer-file-coding-system)
922 base)))))))
921 923
922 ;; If the most preferred coding system has the property mime-charset, 924 ;; If the most preferred coding system has the property mime-charset,
923 ;; append it to the defaults. 925 ;; append it to the defaults.
@@ -935,17 +937,18 @@ It is highly recommended to fix it before writing to a file."
935 (setq accept-default-p select-safe-coding-system-accept-default-p)) 937 (setq accept-default-p select-safe-coding-system-accept-default-p))
936 938
937 ;; Decide the eol-type from the top of the default codings, 939 ;; Decide the eol-type from the top of the default codings,
938 ;; buffer-file-coding-system, or 940 ;; current buffer-file-coding-system, or default buffer-file-coding-system.
939 ;; default-buffer-file-coding-system.
940 (if default-coding-system 941 (if default-coding-system
941 (let ((default-eol-type (coding-system-eol-type 942 (let ((default-eol-type (coding-system-eol-type
942 (caar default-coding-system)))) 943 (caar default-coding-system))))
943 (if (and (vectorp default-eol-type) buffer-file-coding-system) 944 (if (and (vectorp default-eol-type) buffer-file-coding-system)
944 (setq default-eol-type (coding-system-eol-type 945 (setq default-eol-type (coding-system-eol-type
945 buffer-file-coding-system))) 946 buffer-file-coding-system)))
946 (if (and (vectorp default-eol-type) default-buffer-file-coding-system) 947 (if (and (vectorp default-eol-type)
947 (setq default-eol-type (coding-system-eol-type 948 (default-value 'buffer-file-coding-system))
948 default-buffer-file-coding-system))) 949 (setq default-eol-type
950 (coding-system-eol-type
951 (default-value 'buffer-file-coding-system))))
949 (if (and default-eol-type (not (vectorp default-eol-type))) 952 (if (and default-eol-type (not (vectorp default-eol-type)))
950 (dolist (elt default-coding-system) 953 (dolist (elt default-coding-system)
951 (setcar elt (coding-system-change-eol-conversion 954 (setcar elt (coding-system-change-eol-conversion
@@ -1032,7 +1035,7 @@ in this order:
1032 (1) local value of `buffer-file-coding-system' 1035 (1) local value of `buffer-file-coding-system'
1033 (2) value of `sendmail-coding-system' 1036 (2) value of `sendmail-coding-system'
1034 (3) value of `default-sendmail-coding-system' 1037 (3) value of `default-sendmail-coding-system'
1035 (4) value of `default-buffer-file-coding-system' 1038 (4) default value of `buffer-file-coding-system'
1036If the found coding system can't encode the current buffer, 1039If the found coding system can't encode the current buffer,
1037or none of them are bound to a coding system, 1040or none of them are bound to a coding system,
1038it asks the user to select a proper coding system." 1041it asks the user to select a proper coding system."
@@ -1040,7 +1043,7 @@ it asks the user to select a proper coding system."
1040 buffer-file-coding-system) 1043 buffer-file-coding-system)
1041 sendmail-coding-system 1044 sendmail-coding-system
1042 default-sendmail-coding-system 1045 default-sendmail-coding-system
1043 default-buffer-file-coding-system))) 1046 (default-value 'buffer-file-coding-system))))
1044 (if (eq coding 'no-conversion) 1047 (if (eq coding 'no-conversion)
1045 ;; We should never use no-conversion for outgoing mail. 1048 ;; We should never use no-conversion for outgoing mail.
1046 (setq coding nil)) 1049 (setq coding nil))
@@ -1954,9 +1957,9 @@ See `set-language-info-alist' for use in programs."
1954 "Do various coding system setups for language environment LANGUAGE-NAME." 1957 "Do various coding system setups for language environment LANGUAGE-NAME."
1955 (let* ((priority (get-language-info language-name 'coding-priority)) 1958 (let* ((priority (get-language-info language-name 'coding-priority))
1956 (default-coding (car priority)) 1959 (default-coding (car priority))
1957 ;; If default-buffer-file-coding-system is nil, don't use 1960 ;; If the default buffer-file-coding-system is nil, don't use
1958 ;; coding-system-eol-type, because it treats nil as 1961 ;; coding-system-eol-type, because it treats nil as
1959 ;; `no-conversion'. default-buffer-file-coding-system is set 1962 ;; `no-conversion'. The default buffer-file-coding-system is set
1960 ;; to nil by reset-language-environment, and in that case we 1963 ;; to nil by reset-language-environment, and in that case we
1961 ;; want to have here the native EOL type for each platform. 1964 ;; want to have here the native EOL type for each platform.
1962 ;; FIXME: there should be a common code that runs both on 1965 ;; FIXME: there should be a common code that runs both on
@@ -1965,13 +1968,12 @@ See `set-language-info-alist' for use in programs."
1965 ;; which works only as long as the order of loading files at 1968 ;; which works only as long as the order of loading files at
1966 ;; dump time and calling functions at startup is not modified 1969 ;; dump time and calling functions at startup is not modified
1967 ;; significantly, i.e. as long as this function is called 1970 ;; significantly, i.e. as long as this function is called
1968 ;; _after_ default-buffer-file-coding-system was set by 1971 ;; _after_ the default buffer-file-coding-system was set by
1969 ;; dos-w32.el. 1972 ;; dos-w32.el.
1970 (eol-type 1973 (eol-type
1971 (if (null default-buffer-file-coding-system) 1974 (coding-system-eol-type
1972 (cond ((memq system-type '(windows-nt ms-dos)) 1) 1975 (or (default-value 'buffer-file-coding-system)
1973 (t 0)) 1976 (if (memq system-type '(windows-nt ms-dos)) 'dos 'unix)))))
1974 (coding-system-eol-type default-buffer-file-coding-system))))
1975 (when priority 1977 (when priority
1976 (set-default-coding-systems 1978 (set-default-coding-systems
1977 (if (memq eol-type '(0 1 2 unix dos mac)) 1979 (if (memq eol-type '(0 1 2 unix dos mac))
@@ -2564,7 +2566,7 @@ See also `locale-charset-language-names', `locale-language-names',
2564 (charset-language-name 2566 (charset-language-name
2565 (locale-name-match locale locale-charset-language-names)) 2567 (locale-name-match locale locale-charset-language-names))
2566 (default-eol-type (coding-system-eol-type 2568 (default-eol-type (coding-system-eol-type
2567 default-buffer-file-coding-system)) 2569 (default-value 'buffer-file-coding-system)))
2568 (coding-system 2570 (coding-system
2569 (or (locale-name-match locale locale-preferred-coding-systems) 2571 (or (locale-name-match locale locale-preferred-coding-systems)
2570 (when locale 2572 (when locale
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index 89daaae7063..1550443ddd3 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -516,8 +516,8 @@ in place of `..':
516 eol-type of `process-coding-system' for read (of the current buffer, if any) 516 eol-type of `process-coding-system' for read (of the current buffer, if any)
517 `process-coding-system' for write (of the current buffer, if any) 517 `process-coding-system' for write (of the current buffer, if any)
518 eol-type of `process-coding-system' for write (of the current buffer, if any) 518 eol-type of `process-coding-system' for write (of the current buffer, if any)
519 `default-buffer-file-coding-system' 519 default `buffer-file-coding-system'
520 eol-type of `default-buffer-file-coding-system' 520 eol-type of default `buffer-file-coding-system'
521 `default-process-coding-system' for read 521 `default-process-coding-system' for read
522 eol-type of `default-process-coding-system' for read 522 eol-type of `default-process-coding-system' for read
523 `default-process-coding-system' for write 523 `default-process-coding-system' for write
@@ -537,8 +537,9 @@ in place of `..':
537 (coding-system-eol-type-mnemonic (car process-coding-systems)) 537 (coding-system-eol-type-mnemonic (car process-coding-systems))
538 (coding-system-mnemonic (cdr process-coding-systems)) 538 (coding-system-mnemonic (cdr process-coding-systems))
539 (coding-system-eol-type-mnemonic (cdr process-coding-systems)) 539 (coding-system-eol-type-mnemonic (cdr process-coding-systems))
540 (coding-system-mnemonic default-buffer-file-coding-system) 540 (coding-system-mnemonic (default-value 'buffer-file-coding-system))
541 (coding-system-eol-type-mnemonic default-buffer-file-coding-system) 541 (coding-system-eol-type-mnemonic
542 (default-value 'buffer-file-coding-system))
542 (coding-system-mnemonic (car default-process-coding-system)) 543 (coding-system-mnemonic (car default-process-coding-system))
543 (coding-system-eol-type-mnemonic (car default-process-coding-system)) 544 (coding-system-eol-type-mnemonic (car default-process-coding-system))
544 (coding-system-mnemonic (cdr default-process-coding-system)) 545 (coding-system-mnemonic (cdr default-process-coding-system))
@@ -592,7 +593,7 @@ docstring, and print only the first line of the docstring."
592 (print-coding-system-briefly buffer-file-coding-system) 593 (print-coding-system-briefly buffer-file-coding-system)
593 (princ "Not set locally, use the default.\n")) 594 (princ "Not set locally, use the default.\n"))
594 (princ "Default coding system (for new files):\n ") 595 (princ "Default coding system (for new files):\n ")
595 (print-coding-system-briefly default-buffer-file-coding-system) 596 (print-coding-system-briefly (default-value 'buffer-file-coding-system))
596 (princ "Coding system for keyboard input:\n ") 597 (princ "Coding system for keyboard input:\n ")
597 (print-coding-system-briefly (keyboard-coding-system)) 598 (print-coding-system-briefly (keyboard-coding-system))
598 (princ "Coding system for terminal output:\n ") 599 (princ "Coding system for terminal output:\n ")
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 09028a37628..58f52aa68f4 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -931,7 +931,7 @@ This function uses `mail-envelope-from'."
931;;;###autoload 931;;;###autoload
932(defvar sendmail-coding-system nil 932(defvar sendmail-coding-system nil
933 "*Coding system for encoding the outgoing mail. 933 "*Coding system for encoding the outgoing mail.
934This has higher priority than `default-buffer-file-coding-system' 934This has higher priority than the default `buffer-file-coding-system'
935and `default-sendmail-coding-system', 935and `default-sendmail-coding-system',
936but lower priority than the local value of `buffer-file-coding-system'. 936but lower priority than the local value of `buffer-file-coding-system'.
937See also the function `select-message-coding-system'.") 937See also the function `select-message-coding-system'.")
@@ -1509,7 +1509,7 @@ and don't delete any header fields."
1509 (insert-buffer original) 1509 (insert-buffer original)
1510 ;; If they yank the original text, the encoding of the 1510 ;; If they yank the original text, the encoding of the
1511 ;; original message is a better default than 1511 ;; original message is a better default than
1512 ;; default-buffer-file-coding-system. 1512 ;; the default buffer-file-coding-system.
1513 (and (coding-system-equal 1513 (and (coding-system-equal
1514 (default-value 'buffer-file-coding-system) 1514 (default-value 'buffer-file-coding-system)
1515 buffer-file-coding-system) 1515 buffer-file-coding-system)
@@ -1855,7 +1855,7 @@ The seventh argument ACTIONS is a list of actions to take
1855 ;; TRT, or the user will get prompted for the right 1855 ;; TRT, or the user will get prompted for the right
1856 ;; encoding when they send the message. 1856 ;; encoding when they send the message.
1857 (setq buffer-file-coding-system 1857 (setq buffer-file-coding-system
1858 default-buffer-file-coding-system)))))))) 1858 (default-value 'buffer-file-coding-system)))))))))
1859 1859
1860(declare-function dired-move-to-filename "dired" (&optional raise-error eol)) 1860(declare-function dired-move-to-filename "dired" (&optional raise-error eol))
1861(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep)) 1861(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 9ca26b3e943..585cc0a86c6 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,8 @@
12009-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * mh-comp.el (mh-send-letter): default-buffer-file-coding-system
4 => (default-value 'buffer-file-coding-system).
5
12009-08-10 Bill Wohler <wohler@newt.com> 62009-08-10 Bill Wohler <wohler@newt.com>
2 7
3 * mh-junk.el (mh-spamassassin-blacklist, mh-bogofilter-blacklist) 8 * mh-junk.el (mh-spamassassin-blacklist, mh-bogofilter-blacklist)
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 43a1a482cca..5ae78ef1767 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -276,8 +276,8 @@ message and scan line."
276 '(undecided undecided-unix undecided-dos)))) 276 '(undecided undecided-unix undecided-dos))))
277 buffer-file-coding-system 277 buffer-file-coding-system
278 (or (and (boundp 'sendmail-coding-system) sendmail-coding-system) 278 (or (and (boundp 'sendmail-coding-system) sendmail-coding-system)
279 (and (boundp 'default-buffer-file-coding-system ) 279 (and (default-boundp 'buffer-file-coding-system)
280 default-buffer-file-coding-system) 280 (default-value 'buffer-file-coding-system))
281 'iso-latin-1)))) 281 'iso-latin-1))))
282 ;; Older versions of spost do not support -msgid and -mime. 282 ;; Older versions of spost do not support -msgid and -mime.
283 (unless mh-send-uses-spost-flag 283 (unless mh-send-uses-spost-flag
diff --git a/lisp/simple.el b/lisp/simple.el
index f2926401213..6ec2e92dac2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -999,7 +999,7 @@ in *Help* buffer. See also the command `describe-char'."
999 encoded encoding-msg display-prop under-display) 999 encoded encoding-msg display-prop under-display)
1000 (if (or (not coding) 1000 (if (or (not coding)
1001 (eq (coding-system-type coding) t)) 1001 (eq (coding-system-type coding) t))
1002 (setq coding default-buffer-file-coding-system)) 1002 (setq coding (default-value 'buffer-file-coding-system)))
1003 (if (eq (char-charset char) 'eight-bit) 1003 (if (eq (char-charset char) 'eight-bit)
1004 (setq encoding-msg 1004 (setq encoding-msg
1005 (format "(%d, #o%o, #x%x, raw-byte)" char char char)) 1005 (format "(%d, #o%o, #x%x, raw-byte)" char char char))