diff options
| author | Chong Yidong | 2005-09-01 16:38:39 +0000 |
|---|---|---|
| committer | Chong Yidong | 2005-09-01 16:38:39 +0000 |
| commit | 6fd388f37c90d733cd11925c73acfb6af17907cd (patch) | |
| tree | f394dd8c52dc78d9a0995b7103142944392d63d9 | |
| parent | 02de72e92c954fc0c1e125276af9f024bca437a8 (diff) | |
| download | emacs-6fd388f37c90d733cd11925c73acfb6af17907cd.tar.gz emacs-6fd388f37c90d733cd11925c73acfb6af17907cd.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/longlines.el | 10 | ||||
| -rw-r--r-- | lisp/url/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/url/url-mailto.el | 17 | ||||
| -rw-r--r-- | lisp/url/url-util.el | 8 |
5 files changed, 39 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9876442dc9e..34313151376 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-09-01 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * longlines.el (longlines-mode): Inhibit read-only when encoding. | ||
| 4 | Kill local variables when longlines-mode is turned off. | ||
| 5 | |||
| 1 | 2005-09-01 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2005-09-01 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * obsolete/lazy-lock.el (lazy-lock) <defgroup>: Move from font-lock.el. | 8 | * obsolete/lazy-lock.el (lazy-lock) <defgroup>: Move from font-lock.el. |
diff --git a/lisp/longlines.el b/lisp/longlines.el index d51effdb7e2..6ce5dfaebc4 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el | |||
| @@ -116,6 +116,7 @@ are indicated with a symbol." | |||
| 116 | (add-hook 'window-configuration-change-hook | 116 | (add-hook 'window-configuration-change-hook |
| 117 | 'longlines-window-change-function nil t)) | 117 | 'longlines-window-change-function nil t)) |
| 118 | (let ((buffer-undo-list t) | 118 | (let ((buffer-undo-list t) |
| 119 | (inhibit-read-only t) | ||
| 119 | (mod (buffer-modified-p))) | 120 | (mod (buffer-modified-p))) |
| 120 | ;; Turning off undo is OK since (spaces + newlines) is | 121 | ;; Turning off undo is OK since (spaces + newlines) is |
| 121 | ;; conserved, except for a corner case in | 122 | ;; conserved, except for a corner case in |
| @@ -136,7 +137,8 @@ are indicated with a symbol." | |||
| 136 | (setq buffer-file-format (delete 'longlines buffer-file-format)) | 137 | (setq buffer-file-format (delete 'longlines buffer-file-format)) |
| 137 | (if longlines-showing | 138 | (if longlines-showing |
| 138 | (longlines-unshow-hard-newlines)) | 139 | (longlines-unshow-hard-newlines)) |
| 139 | (let ((buffer-undo-list t)) | 140 | (let ((buffer-undo-list t) |
| 141 | (inhibit-read-only t)) | ||
| 140 | (longlines-encode-region (point-min) (point-max))) | 142 | (longlines-encode-region (point-min) (point-max))) |
| 141 | (remove-hook 'change-major-mode-hook 'longlines-mode-off t) | 143 | (remove-hook 'change-major-mode-hook 'longlines-mode-off t) |
| 142 | (remove-hook 'before-kill-functions 'longlines-encode-region t) | 144 | (remove-hook 'before-kill-functions 'longlines-encode-region t) |
| @@ -144,7 +146,11 @@ are indicated with a symbol." | |||
| 144 | (remove-hook 'post-command-hook 'longlines-post-command-function t) | 146 | (remove-hook 'post-command-hook 'longlines-post-command-function t) |
| 145 | (remove-hook 'window-configuration-change-hook | 147 | (remove-hook 'window-configuration-change-hook |
| 146 | 'longlines-window-change-function t) | 148 | 'longlines-window-change-function t) |
| 147 | (kill-local-variable 'fill-column))) | 149 | (when longlines-wrap-follows-window-size |
| 150 | (kill-local-variable 'fill-column)) | ||
| 151 | (kill-local-variable 'require-final-newline) | ||
| 152 | (kill-local-variable 'buffer-substring-filters) | ||
| 153 | (kill-local-variable 'use-hard-newlines))) | ||
| 148 | 154 | ||
| 149 | (defun longlines-mode-off () | 155 | (defun longlines-mode-off () |
| 150 | "Turn off longlines mode. | 156 | "Turn off longlines mode. |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index e1d8406ae70..ad0ee150207 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2005-09-01 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * url-util.el (url-parse-query-string): New optional argument | ||
| 4 | allow-newlines allows decoding of newlines. | ||
| 5 | |||
| 6 | * url-mailto.el (url-mailto): Allow newlines in URL arguments. | ||
| 7 | Don't lose original "to" value when there is a "to" header. | ||
| 8 | Remove carriage return characters in message body. | ||
| 9 | |||
| 1 | 2005-08-24 Juanma Barranquero <lekktu@gmail.com> | 10 | 2005-08-24 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 11 | ||
| 3 | * url-news.el (nntp-open-tls-stream, nntp-open-ssl-stream): | 12 | * url-news.el (nntp-open-tls-stream, nntp-open-ssl-stream): |
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el index 86f5d4a88b6..9b63a35f3bd 100644 --- a/lisp/url/url-mailto.el +++ b/lisp/url/url-mailto.el | |||
| @@ -73,7 +73,7 @@ | |||
| 73 | (setq headers-start (match-end 0) | 73 | (setq headers-start (match-end 0) |
| 74 | to (url-unhex-string (substring url 0 (match-beginning 0))) | 74 | to (url-unhex-string (substring url 0 (match-beginning 0))) |
| 75 | args (url-parse-query-string | 75 | args (url-parse-query-string |
| 76 | (substring url headers-start nil) t)) | 76 | (substring url headers-start nil) t t)) |
| 77 | (setq to (url-unhex-string url))) | 77 | (setq to (url-unhex-string url))) |
| 78 | (setq source-url (url-view-url t)) | 78 | (setq source-url (url-view-url t)) |
| 79 | (if (and url-request-data (not (assoc "subject" args))) | 79 | (if (and url-request-data (not (assoc "subject" args))) |
| @@ -84,16 +84,23 @@ | |||
| 84 | (if (and source-url (not (assoc "x-url-from" args))) | 84 | (if (and source-url (not (assoc "x-url-from" args))) |
| 85 | (setq args (cons (list "x-url-from" source-url) args))) | 85 | (setq args (cons (list "x-url-from" source-url) args))) |
| 86 | 86 | ||
| 87 | (if (assoc "to" args) | 87 | (let ((tolist (assoc "to" args))) |
| 88 | (push (cdr (assoc "to" args)) to) | 88 | (if tolist |
| 89 | (setq args (cons (list "to" to) args))) | 89 | (if (not (string= to "")) |
| 90 | (setcdr tolist | ||
| 91 | (list (concat to ", " (nth 1 tolist))))) | ||
| 92 | (setq args (cons (list "to" to) args)))) | ||
| 93 | |||
| 90 | (setq subject (cdr-safe (assoc "subject" args))) | 94 | (setq subject (cdr-safe (assoc "subject" args))) |
| 91 | (if (fboundp url-mail-command) (funcall url-mail-command) (mail)) | 95 | (if (fboundp url-mail-command) (funcall url-mail-command) (mail)) |
| 92 | (while args | 96 | (while args |
| 93 | (if (string= (caar args) "body") | 97 | (if (string= (caar args) "body") |
| 94 | (progn | 98 | (progn |
| 95 | (goto-char (point-max)) | 99 | (goto-char (point-max)) |
| 96 | (insert (mapconcat 'identity (cdar args) "\n"))) | 100 | (insert (mapconcat |
| 101 | #'(lambda (string) | ||
| 102 | (replace-regexp-in-string "\r\n" "\n" string)) | ||
| 103 | (cdar args) "\n"))) | ||
| 97 | (url-mail-goto-field (caar args)) | 104 | (url-mail-goto-field (caar args)) |
| 98 | (setq func (intern-soft (concat "mail-" (caar args)))) | 105 | (setq func (intern-soft (concat "mail-" (caar args)))) |
| 99 | (insert (mapconcat 'identity (cdar args) ", "))) | 106 | (insert (mapconcat 'identity (cdar args) ", "))) |
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index bec0c7a3133..538eb3eca45 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el | |||
| @@ -270,7 +270,7 @@ Will not do anything if `url-show-status' is nil." | |||
| 270 | (t (file-name-directory file)))) | 270 | (t (file-name-directory file)))) |
| 271 | 271 | ||
| 272 | ;;;###autoload | 272 | ;;;###autoload |
| 273 | (defun url-parse-query-string (query &optional downcase) | 273 | (defun url-parse-query-string (query &optional downcase allow-newlines) |
| 274 | (let (retval pairs cur key val) | 274 | (let (retval pairs cur key val) |
| 275 | (setq pairs (split-string query "&")) | 275 | (setq pairs (split-string query "&")) |
| 276 | (while pairs | 276 | (while pairs |
| @@ -278,8 +278,10 @@ Will not do anything if `url-show-status' is nil." | |||
| 278 | pairs (cdr pairs)) | 278 | pairs (cdr pairs)) |
| 279 | (if (not (string-match "=" cur)) | 279 | (if (not (string-match "=" cur)) |
| 280 | nil ; Grace | 280 | nil ; Grace |
| 281 | (setq key (url-unhex-string (substring cur 0 (match-beginning 0))) | 281 | (setq key (url-unhex-string (substring cur 0 (match-beginning 0)) |
| 282 | val (url-unhex-string (substring cur (match-end 0) nil))) | 282 | allow-newlines)) |
| 283 | (setq val (url-unhex-string (substring cur (match-end 0) nil) | ||
| 284 | allow-newlines)) | ||
| 283 | (if downcase | 285 | (if downcase |
| 284 | (setq key (downcase key))) | 286 | (setq key (downcase key))) |
| 285 | (setq cur (assoc key retval)) | 287 | (setq cur (assoc key retval)) |