diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 31 | ||||
| -rw-r--r-- | lisp/autorevert.el | 79 | ||||
| -rw-r--r-- | lisp/color.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/ert.el | 2 | ||||
| -rw-r--r-- | lisp/erc/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/erc/erc-dcc.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-async.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/mml-smime.el | 28 |
10 files changed, 137 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d4566a91a6..7eef2c80382 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2013-01-11 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * autorevert.el (top): Require 'cl in order to pacify byte compiler. | ||
| 4 | (auto-revert-notify-rm-watch): Ignore errors. | ||
| 5 | (auto-revert-notify-add-watch): Ignore errors. Use '(modify) for | ||
| 6 | inotify, and '(size last-write-time) for w32notify. Set | ||
| 7 | buffer-local `auto-revert-use-notify' to nil when adding a file | ||
| 8 | watch fails - this is a fallback to the file modification check. | ||
| 9 | (auto-revert-notify-event-p, auto-revert-notify-event-descriptor) | ||
| 10 | (auto-revert-notify-event-action) | ||
| 11 | (auto-revert-notify-event-file-name): New defuns. | ||
| 12 | (auto-revert-notify-handler): Use them. Implement first | ||
| 13 | plausibility checks. | ||
| 14 | (auto-revert-handler): Handle also `auto-revert-tail-mode'. | ||
| 15 | |||
| 16 | 2013-01-11 Julien Danjou <julien@danjou.info> | ||
| 17 | |||
| 18 | * color.el (color-rgb-to-hsv): Fix conversion computing in case min and | ||
| 19 | max are almost equal. Also return the correct value for V which is | ||
| 20 | already between 0 and 1. | ||
| 21 | |||
| 22 | 2013-01-11 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 23 | |||
| 24 | * emacs-lisp/ert.el (ert-run-test): Use point-max-marker. | ||
| 25 | |||
| 26 | 2013-01-11 Eli Zaretskii <eliz@gnu.org> | ||
| 27 | |||
| 28 | * autorevert.el (auto-revert-notify-rm-watch) | ||
| 29 | (auto-revert-notify-add-watch): Fix typos in w32notify function | ||
| 30 | names. | ||
| 31 | |||
| 1 | 2013-01-10 Michael Albinus <michael.albinus@gmx.de> | 32 | 2013-01-10 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 33 | ||
| 3 | * autorevert.el (auto-revert-notify-enabled): Move up. | 34 | * autorevert.el (auto-revert-notify-enabled): Move up. |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 4434ed21169..e78cecf0cc2 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -97,6 +97,7 @@ | |||
| 97 | 97 | ||
| 98 | ;; Dependencies: | 98 | ;; Dependencies: |
| 99 | 99 | ||
| 100 | (eval-when-compile (require 'cl)) | ||
| 100 | (require 'timer) | 101 | (require 'timer) |
| 101 | 102 | ||
| 102 | ;; Custom Group: | 103 | ;; Custom Group: |
| @@ -466,8 +467,10 @@ will use an up-to-date value of `auto-revert-interval'" | |||
| 466 | (defun auto-revert-notify-rm-watch () | 467 | (defun auto-revert-notify-rm-watch () |
| 467 | "Disable file watch for current buffer's associated file." | 468 | "Disable file watch for current buffer's associated file." |
| 468 | (when auto-revert-notify-watch-descriptor | 469 | (when auto-revert-notify-watch-descriptor |
| 469 | (funcall (if (fboundp 'inotify-rm-watch) 'inotify-rm-watch 'w32-rm-watch) | 470 | (ignore-errors |
| 470 | auto-revert-notify-watch-descriptor) | 471 | (funcall (if (fboundp 'inotify-rm-watch) |
| 472 | 'inotify-rm-watch 'w32notify-rm-watch) | ||
| 473 | auto-revert-notify-watch-descriptor)) | ||
| 471 | (remhash auto-revert-notify-watch-descriptor | 474 | (remhash auto-revert-notify-watch-descriptor |
| 472 | auto-revert-notify-watch-descriptor-hash-list)) | 475 | auto-revert-notify-watch-descriptor-hash-list)) |
| 473 | (setq auto-revert-notify-watch-descriptor nil | 476 | (setq auto-revert-notify-watch-descriptor nil |
| @@ -478,21 +481,62 @@ will use an up-to-date value of `auto-revert-interval'" | |||
| 478 | (when (and buffer-file-name auto-revert-use-notify) | 481 | (when (and buffer-file-name auto-revert-use-notify) |
| 479 | (auto-revert-notify-rm-watch) | 482 | (auto-revert-notify-rm-watch) |
| 480 | (let ((func (if (fboundp 'inotify-add-watch) | 483 | (let ((func (if (fboundp 'inotify-add-watch) |
| 481 | 'inotify-add-watch 'w32-add-watch)) | 484 | 'inotify-add-watch 'w32notify-add-watch)) |
| 482 | (aspect (if (fboundp 'inotify-add-watch) | 485 | (aspect (if (fboundp 'inotify-add-watch) |
| 483 | '(close-write) '(last-write-time)))) | 486 | '(modify) '(size last-write-time)))) |
| 484 | (setq auto-revert-notify-watch-descriptor | 487 | (setq auto-revert-notify-watch-descriptor |
| 485 | (funcall func buffer-file-name aspect 'auto-revert-notify-handler)) | 488 | (ignore-errors |
| 486 | (puthash auto-revert-notify-watch-descriptor | 489 | (funcall |
| 487 | (current-buffer) | 490 | func buffer-file-name aspect 'auto-revert-notify-handler))) |
| 488 | auto-revert-notify-watch-descriptor-hash-list)))) | 491 | (if auto-revert-notify-watch-descriptor |
| 492 | (puthash auto-revert-notify-watch-descriptor | ||
| 493 | (current-buffer) | ||
| 494 | auto-revert-notify-watch-descriptor-hash-list) | ||
| 495 | ;; Fallback to file checks. | ||
| 496 | (set (make-local-variable 'auto-revert-use-notify) nil))))) | ||
| 497 | |||
| 498 | (defun auto-revert-notify-event-p (event) | ||
| 499 | "Check that event is a file watch event." | ||
| 500 | (cond ((featurep 'inotify) | ||
| 501 | (and (listp event) (= (length event) 4))) | ||
| 502 | ((featurep 'w32notify) | ||
| 503 | (and (listp event) (= (length event) 3) (stringp (nth 2 event)))))) | ||
| 504 | |||
| 505 | (defun auto-revert-notify-event-descriptor (event) | ||
| 506 | "Return watch descriptor of notification event, or nil." | ||
| 507 | (and (auto-revert-notify-event-p event) (car event))) | ||
| 508 | |||
| 509 | (defun auto-revert-notify-event-action (event) | ||
| 510 | "Return action of notification event, or nil." | ||
| 511 | (and (auto-revert-notify-event-p event) (nth 1 event))) | ||
| 512 | |||
| 513 | (defun auto-revert-notify-event-file-name (event) | ||
| 514 | "Return file name of notification event, or nil." | ||
| 515 | (and (auto-revert-notify-event-p event) | ||
| 516 | (cond ((featurep 'inotify) (nth 3 event)) | ||
| 517 | ((featurep 'w32notify) (nth 2 event))))) | ||
| 489 | 518 | ||
| 490 | (defun auto-revert-notify-handler (event) | 519 | (defun auto-revert-notify-handler (event) |
| 491 | "Handle an event returned from file watch." | 520 | "Handle an event returned from file watch." |
| 492 | (when (listp event) | 521 | (when (auto-revert-notify-event-p event) |
| 493 | (let ((buffer | 522 | (let* ((descriptor (auto-revert-notify-event-descriptor event)) |
| 494 | (gethash (car event) auto-revert-notify-watch-descriptor-hash-list))) | 523 | (action (auto-revert-notify-event-action event)) |
| 495 | (when (bufferp buffer) | 524 | (file (auto-revert-notify-event-file-name event)) |
| 525 | (buffer (gethash descriptor | ||
| 526 | auto-revert-notify-watch-descriptor-hash-list))) | ||
| 527 | (ignore-errors | ||
| 528 | ;; Check, that event is meant for us. | ||
| 529 | ;; TODO: Filter events which stop watching, like `move' or `removed'. | ||
| 530 | (assert descriptor) | ||
| 531 | (when (featurep 'inotify) (assert (memq 'modify descriptor))) | ||
| 532 | (when (featurep 'w32notify) (assert (eq 'modified descriptor))) | ||
| 533 | (assert (bufferp buffer)) | ||
| 534 | (when (stringp file) | ||
| 535 | (assert (string-equal | ||
| 536 | (directory-file-name file) | ||
| 537 | (directory-file-name (buffer-file-name buffer))))) | ||
| 538 | |||
| 539 | ;; Mark buffer modified. | ||
| 496 | (with-current-buffer buffer | 540 | (with-current-buffer buffer |
| 497 | (setq auto-revert-notify-modified-p t)))))) | 541 | (setq auto-revert-notify-modified-p t)))))) |
| 498 | 542 | ||
| @@ -513,6 +557,8 @@ This is an internal function used by Auto-Revert Mode." | |||
| 513 | (let* ((buffer (current-buffer)) size | 557 | (let* ((buffer (current-buffer)) size |
| 514 | (revert | 558 | (revert |
| 515 | (or (and buffer-file-name | 559 | (or (and buffer-file-name |
| 560 | (or (not auto-revert-use-notify) | ||
| 561 | auto-revert-notify-modified-p) | ||
| 516 | (if auto-revert-tail-mode | 562 | (if auto-revert-tail-mode |
| 517 | ;; Tramp caches the file attributes. Setting | 563 | ;; Tramp caches the file attributes. Setting |
| 518 | ;; `remote-file-name-inhibit-cache' forces Tramp | 564 | ;; `remote-file-name-inhibit-cache' forces Tramp |
| @@ -523,12 +569,9 @@ This is an internal function used by Auto-Revert Mode." | |||
| 523 | (setq size | 569 | (setq size |
| 524 | (nth 7 (file-attributes | 570 | (nth 7 (file-attributes |
| 525 | buffer-file-name)))))) | 571 | buffer-file-name)))))) |
| 526 | (if auto-revert-use-notify | 572 | (and (not (file-remote-p buffer-file-name)) |
| 527 | ;; There are file watches. | 573 | (file-readable-p buffer-file-name) |
| 528 | auto-revert-notify-modified-p | 574 | (not (verify-visited-file-modtime buffer))))) |
| 529 | (and (not (file-remote-p buffer-file-name)) | ||
| 530 | (file-readable-p buffer-file-name) | ||
| 531 | (not (verify-visited-file-modtime buffer)))))) | ||
| 532 | (and (or auto-revert-mode | 575 | (and (or auto-revert-mode |
| 533 | global-auto-revert-non-file-buffers) | 576 | global-auto-revert-non-file-buffers) |
| 534 | revert-buffer-function | 577 | revert-buffer-function |
diff --git a/lisp/color.el b/lisp/color.el index 63326e7c5b3..50f6675bf4b 100644 --- a/lisp/color.el +++ b/lisp/color.el | |||
| @@ -130,7 +130,7 @@ inclusive." | |||
| 130 | (max (max r g b)) | 130 | (max (max r g b)) |
| 131 | (min (min r g b))) | 131 | (min (min r g b))) |
| 132 | (if (< (- max min) 1e-8) | 132 | (if (< (- max min) 1e-8) |
| 133 | (list 0.0 0.0 0.0) | 133 | (list 0.0 0.0 min) |
| 134 | (list | 134 | (list |
| 135 | (/ (* 2 float-pi | 135 | (/ (* 2 float-pi |
| 136 | (cond ((and (= r g) (= g b)) 0) | 136 | (cond ((and (= r g) (= g b)) 0) |
| @@ -146,7 +146,7 @@ inclusive." | |||
| 146 | (+ 240 (* 60 (/ (- r g) (- max min))))))) | 146 | (+ 240 (* 60 (/ (- r g) (- max min))))))) |
| 147 | 360) | 147 | 360) |
| 148 | (if (= max 0) 0 (- 1 (/ min max))) | 148 | (if (= max 0) 0 (- 1 (/ min max))) |
| 149 | (/ max 255.0))))) | 149 | max)))) |
| 150 | 150 | ||
| 151 | (defun color-rgb-to-hsl (red green blue) | 151 | (defun color-rgb-to-hsl (red green blue) |
| 152 | "Convert RGB colors to their HSL representation. | 152 | "Convert RGB colors to their HSL representation. |
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 70d6a6a4a5f..dd849362228 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el | |||
| @@ -937,7 +937,7 @@ Returns the result and stores it in ERT-TEST's `most-recent-result' slot." | |||
| 937 | (cl-block error | 937 | (cl-block error |
| 938 | (let ((begin-marker | 938 | (let ((begin-marker |
| 939 | (with-current-buffer (get-buffer-create "*Messages*") | 939 | (with-current-buffer (get-buffer-create "*Messages*") |
| 940 | (set-marker (make-marker) (point-max))))) | 940 | (point-max-marker)))) |
| 941 | (unwind-protect | 941 | (unwind-protect |
| 942 | (let ((info (make-ert--test-execution-info | 942 | (let ((info (make-ert--test-execution-info |
| 943 | :test ert-test | 943 | :test ert-test |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 3a625eb215e..bbe551c735d 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-01-11 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * erc-dcc.el (erc-dcc-send-file): Use point-min-marker. | ||
| 4 | (erc-dcc-chat-setup): Use point-max-marker. | ||
| 5 | |||
| 1 | 2013-01-04 Glenn Morris <rgm@gnu.org> | 6 | 2013-01-04 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * erc-backend.el (312): Fix typo. (Bug#13235) | 8 | * erc-backend.el (312): Fix typo. (Bug#13235) |
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index dc67d3b01df..c27bb629f9d 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el | |||
| @@ -897,7 +897,7 @@ other client." | |||
| 897 | (let* ((buffer (erc-dcc-find-file file)) | 897 | (let* ((buffer (erc-dcc-find-file file)) |
| 898 | (size (buffer-size buffer)) | 898 | (size (buffer-size buffer)) |
| 899 | (start (with-current-buffer buffer | 899 | (start (with-current-buffer buffer |
| 900 | (set-marker (make-marker) (point-min)))) | 900 | (point-min-marker))) |
| 901 | (sproc (erc-dcc-server "dcc-send" | 901 | (sproc (erc-dcc-server "dcc-send" |
| 902 | 'erc-dcc-send-filter | 902 | 'erc-dcc-send-filter |
| 903 | 'erc-dcc-send-sentinel)) | 903 | 'erc-dcc-send-sentinel)) |
| @@ -1166,7 +1166,7 @@ other client." | |||
| 1166 | (setq erc-dcc-from nick) | 1166 | (setq erc-dcc-from nick) |
| 1167 | (setq erc-dcc-entry-data entry) | 1167 | (setq erc-dcc-entry-data entry) |
| 1168 | (setq erc-dcc-unprocessed-output "") | 1168 | (setq erc-dcc-unprocessed-output "") |
| 1169 | (setq erc-insert-marker (set-marker (make-marker) (point-max))) | 1169 | (setq erc-insert-marker (point-max-marker)) |
| 1170 | (setq erc-input-marker (make-marker)) | 1170 | (setq erc-input-marker (make-marker)) |
| 1171 | (erc-display-prompt buffer (point-max)) | 1171 | (erc-display-prompt buffer (point-max)) |
| 1172 | (set-process-buffer proc buffer) | 1172 | (set-process-buffer proc buffer) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index dd93c7b22fe..0cea790792f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2013-01-11 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * gnus-art.el (gnus-mime-display-security): Use point-min-marker | ||
| 4 | and point-max-marker. | ||
| 5 | * gnus-async.el (gnus-async-article-callback): Use point-max-marker. | ||
| 6 | |||
| 7 | 2013-01-10 Uwe Brauer <oub@mat.ucm.es> (tiny change) | ||
| 8 | |||
| 9 | * mml-smime.el (mml-smime-encrypt-to-self): New user option analogous | ||
| 10 | to mml2015-encrypt-to-self. | ||
| 11 | (mml-smime-epg-encrypt): Respect mml-smime-encrypt-to-self. | ||
| 12 | |||
| 1 | 2013-01-09 Daiki Ueno <ueno@gnu.org> | 13 | 2013-01-09 Daiki Ueno <ueno@gnu.org> |
| 2 | 14 | ||
| 3 | * mml-smime.el (epg-sub-key-fingerprint): Autoload for | 15 | * mml-smime.el (epg-sub-key-fingerprint): Autoload for |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 1b4cddc5009..25a555f3d8b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -8688,9 +8688,7 @@ For example: | |||
| 8688 | gnus-mime-security-button-end-line-format)) | 8688 | gnus-mime-security-button-end-line-format)) |
| 8689 | (gnus-insert-mime-security-button handle))) | 8689 | (gnus-insert-mime-security-button handle))) |
| 8690 | (mm-set-handle-multipart-parameter | 8690 | (mm-set-handle-multipart-parameter |
| 8691 | handle 'gnus-region | 8691 | handle 'gnus-region (cons (point-min-marker) (point-max-marker))) |
| 8692 | (cons (set-marker (make-marker) (point-min)) | ||
| 8693 | (set-marker (make-marker) (point-max)))) | ||
| 8694 | (goto-char (point-max)))) | 8692 | (goto-char (point-max)))) |
| 8695 | 8693 | ||
| 8696 | (defun gnus-mime-security-run-function (function) | 8694 | (defun gnus-mime-security-run-function (function) |
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el index 41b0cc25006..c5d64332547 100644 --- a/lisp/gnus/gnus-async.el +++ b/lisp/gnus/gnus-async.el | |||
| @@ -254,7 +254,7 @@ that was fetched." | |||
| 254 | gnus-async-article-alist | 254 | gnus-async-article-alist |
| 255 | (cons (list (intern (format "%s-%d" group article) | 255 | (cons (list (intern (format "%s-%d" group article) |
| 256 | gnus-async-hashtb) | 256 | gnus-async-hashtb) |
| 257 | mark (set-marker (make-marker) (point-max)) | 257 | mark (point-max-marker) |
| 258 | group article) | 258 | group article) |
| 259 | gnus-async-article-alist)))) | 259 | gnus-async-article-alist)))) |
| 260 | (if (not (gnus-buffer-live-p summary)) | 260 | (if (not (gnus-buffer-live-p summary)) |
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index e5e99dedcbe..6ea55377e02 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el | |||
| @@ -80,6 +80,12 @@ Whether the passphrase is cached at all is controlled by | |||
| 80 | :version "24.4" | 80 | :version "24.4" |
| 81 | :type 'boolean) | 81 | :type 'boolean) |
| 82 | 82 | ||
| 83 | (defcustom mml-smime-encrypt-to-self nil | ||
| 84 | "If t, add your own key ID to recipient list when encryption." | ||
| 85 | :group 'mime-security | ||
| 86 | :version "24.4" | ||
| 87 | :type 'boolean) | ||
| 88 | |||
| 83 | (defun mml-smime-sign (cont) | 89 | (defun mml-smime-sign (cont) |
| 84 | (let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist)))) | 90 | (let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist)))) |
| 85 | (if func | 91 | (if func |
| @@ -475,13 +481,17 @@ Content-Disposition: attachment; filename=smime.p7s | |||
| 475 | (goto-char (point-max)))) | 481 | (goto-char (point-max)))) |
| 476 | 482 | ||
| 477 | (defun mml-smime-epg-encrypt (cont) | 483 | (defun mml-smime-epg-encrypt (cont) |
| 478 | (let ((inhibit-redisplay t) | 484 | (let* ((inhibit-redisplay t) |
| 479 | (context (epg-make-context 'CMS)) | 485 | (context (epg-make-context 'CMS)) |
| 480 | (config (epg-configuration)) | 486 | (config (epg-configuration)) |
| 481 | (recipients (message-options-get 'mml-smime-epg-recipients)) | 487 | (recipients (message-options-get 'mml-smime-epg-recipients)) |
| 482 | cipher signers | 488 | cipher signers |
| 483 | (boundary (mml-compute-boundary cont)) | 489 | (sender (message-options-get 'message-sender)) |
| 484 | recipient-key) | 490 | (signer-names (or mml-smime-signers |
| 491 | (if (and mml-smime-sign-with-sender sender) | ||
| 492 | (list (concat "<" sender ">"))))) | ||
| 493 | (boundary (mml-compute-boundary cont)) | ||
| 494 | recipient-key) | ||
| 485 | (unless recipients | 495 | (unless recipients |
| 486 | (setq recipients | 496 | (setq recipients |
| 487 | (apply #'nconc | 497 | (apply #'nconc |
| @@ -494,6 +504,10 @@ Content-Disposition: attachment; filename=smime.p7s | |||
| 494 | (message-options-set 'message-recipients | 504 | (message-options-set 'message-recipients |
| 495 | (read-string "Recipients: "))) | 505 | (read-string "Recipients: "))) |
| 496 | "[ \f\t\n\r\v,]+")))) | 506 | "[ \f\t\n\r\v,]+")))) |
| 507 | (when mml-smime-encrypt-to-self | ||
| 508 | (unless signer-names | ||
| 509 | (error "Neither message sender nor mml-smime-signers are set")) | ||
| 510 | (setq recipients (nconc recipients signer-names))) | ||
| 497 | (if (eq mm-encrypt-option 'guided) | 511 | (if (eq mm-encrypt-option 'guided) |
| 498 | (setq recipients | 512 | (setq recipients |
| 499 | (epa-select-keys context "\ | 513 | (epa-select-keys context "\ |