diff options
| author | Stefan Monnier | 2012-10-15 12:49:57 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-10-15 12:49:57 -0400 |
| commit | 8599b23a90cf10e7308a59dbf9197d8e4c439ee2 (patch) | |
| tree | 59891e6efc6297d834f307dd9891f2d31e821c7d | |
| parent | 9520f2f20c77fbb2631511f9c0c8e74c5759d834 (diff) | |
| download | emacs-8599b23a90cf10e7308a59dbf9197d8e4c439ee2.tar.gz emacs-8599b23a90cf10e7308a59dbf9197d8e4c439ee2.zip | |
* lisp/erc/erc.el (erc-log): Make it into a defsubst.
(erc-with-server-buffer, define-erc-module, erc-with-buffer)
(erc-with-all-buffers-of-server): Use `declare'.
* lisp/erc/erc-backend.el (erc-log): Adjust autoload accordingly.
| -rw-r--r-- | lisp/erc/ChangeLog | 17 | ||||
| -rw-r--r-- | lisp/erc/erc-backend.el | 2 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 18 | ||||
| -rw-r--r-- | src/ChangeLog | 15 |
4 files changed, 27 insertions, 25 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 8b4df6099bc..343a6655701 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-10-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * erc.el (erc-log): Make it into a defsubst. | ||
| 4 | (erc-with-server-buffer, define-erc-module, erc-with-buffer) | ||
| 5 | (erc-with-all-buffers-of-server): Use `declare'. | ||
| 6 | * erc-backend.el (erc-log): Adjust autoload accordingly. | ||
| 7 | |||
| 1 | 2012-10-07 Deniz Dogan <deniz@dogan.se> | 8 | 2012-10-07 Deniz Dogan <deniz@dogan.se> |
| 2 | 9 | ||
| 3 | * erc-log.el (erc-generate-log-file-name-function): | 10 | * erc-log.el (erc-generate-log-file-name-function): |
| @@ -42,8 +49,8 @@ | |||
| 42 | 49 | ||
| 43 | 2012-08-21 Julien Danjou <julien@danjou.info> | 50 | 2012-08-21 Julien Danjou <julien@danjou.info> |
| 44 | 51 | ||
| 45 | * erc-match.el (erc-match-message): Use | 52 | * erc-match.el (erc-match-message): |
| 46 | `erc-match-exclude-server-buffer' not | 53 | Use `erc-match-exclude-server-buffer' not |
| 47 | `erc-track-exclude-server-buffer'. | 54 | `erc-track-exclude-server-buffer'. |
| 48 | 55 | ||
| 49 | 2012-08-20 Josh Feinstein <jlf@foxtail.org> | 56 | 2012-08-20 Josh Feinstein <jlf@foxtail.org> |
| @@ -56,8 +63,8 @@ | |||
| 56 | (erc-lurker-threshold-time): New variables. | 63 | (erc-lurker-threshold-time): New variables. |
| 57 | (erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup) | 64 | (erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup) |
| 58 | (erc-hide-current-message-p, erc-canonicalize-server-name) | 65 | (erc-hide-current-message-p, erc-canonicalize-server-name) |
| 59 | (erc-lurker-update-status, erc-lurker-p): New functions. Together | 66 | (erc-lurker-update-status, erc-lurker-p): New functions. |
| 60 | they maintain state about which users have spoken in the last | 67 | Together they maintain state about which users have spoken in the last |
| 61 | erc-lurker-threshold-time, with all other users being considered | 68 | erc-lurker-threshold-time, with all other users being considered |
| 62 | lurkers whose messages of types in erc-lurker-hide-list will not | 69 | lurkers whose messages of types in erc-lurker-hide-list will not |
| 63 | be displayed by erc-display-message. | 70 | be displayed by erc-display-message. |
| @@ -192,7 +199,7 @@ | |||
| 192 | 199 | ||
| 193 | * erc.el (erc-ssl): Made into a synonym for erc-tls, which | 200 | * erc.el (erc-ssl): Made into a synonym for erc-tls, which |
| 194 | provides a superset of the same functionality. | 201 | provides a superset of the same functionality. |
| 195 | (erc-open-ssl-stream): Removed. | 202 | (erc-open-ssl-stream): Remove. |
| 196 | (erc-open-tls-stream): Use `open-network-stream' instead of | 203 | (erc-open-tls-stream): Use `open-network-stream' instead of |
| 197 | `open-tls-stream' directly to be able to use the built-in TLS | 204 | `open-tls-stream' directly to be able to use the built-in TLS |
| 198 | support. | 205 | support. |
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 20ccd071b95..b8b5c90b596 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el | |||
| @@ -100,7 +100,7 @@ | |||
| 100 | (require 'erc-compat) | 100 | (require 'erc-compat) |
| 101 | (eval-when-compile (require 'cl)) | 101 | (eval-when-compile (require 'cl)) |
| 102 | (autoload 'erc-with-buffer "erc" nil nil 'macro) | 102 | (autoload 'erc-with-buffer "erc" nil nil 'macro) |
| 103 | (autoload 'erc-log "erc" nil nil 'macro) | 103 | (autoload 'erc-log "erc") |
| 104 | 104 | ||
| 105 | ;;;; Variables and options | 105 | ;;;; Variables and options |
| 106 | 106 | ||
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index bbd9dad4310..2e97131b603 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -362,13 +362,12 @@ nicknames with erc-server-user struct instances.") | |||
| 362 | (defmacro erc-with-server-buffer (&rest body) | 362 | (defmacro erc-with-server-buffer (&rest body) |
| 363 | "Execute BODY in the current ERC server buffer. | 363 | "Execute BODY in the current ERC server buffer. |
| 364 | If no server buffer exists, return nil." | 364 | If no server buffer exists, return nil." |
| 365 | (declare (indent 0) (debug (body))) | ||
| 365 | (let ((buffer (make-symbol "buffer"))) | 366 | (let ((buffer (make-symbol "buffer"))) |
| 366 | `(let ((,buffer (erc-server-buffer))) | 367 | `(let ((,buffer (erc-server-buffer))) |
| 367 | (when (buffer-live-p ,buffer) | 368 | (when (buffer-live-p ,buffer) |
| 368 | (with-current-buffer ,buffer | 369 | (with-current-buffer ,buffer |
| 369 | ,@body))))) | 370 | ,@body))))) |
| 370 | (put 'erc-with-server-buffer 'lisp-indent-function 0) | ||
| 371 | (put 'erc-with-server-buffer 'edebug-form-spec '(body)) | ||
| 372 | 371 | ||
| 373 | (defstruct (erc-server-user (:type vector) :named) | 372 | (defstruct (erc-server-user (:type vector) :named) |
| 374 | ;; User data | 373 | ;; User data |
| @@ -1236,6 +1235,7 @@ Example: | |||
| 1236 | 'erc-replace-insert)) | 1235 | 'erc-replace-insert)) |
| 1237 | ((remove-hook 'erc-insert-modify-hook | 1236 | ((remove-hook 'erc-insert-modify-hook |
| 1238 | 'erc-replace-insert)))" | 1237 | 'erc-replace-insert)))" |
| 1238 | (declare (doc-string 3)) | ||
| 1239 | (let* ((sn (symbol-name name)) | 1239 | (let* ((sn (symbol-name name)) |
| 1240 | (mode (intern (format "erc-%s-mode" (downcase sn)))) | 1240 | (mode (intern (format "erc-%s-mode" (downcase sn)))) |
| 1241 | (group (intern (format "erc-%s" (downcase sn)))) | 1241 | (group (intern (format "erc-%s" (downcase sn)))) |
| @@ -1281,8 +1281,6 @@ if ARG is omitted or nil. | |||
| 1281 | (put ',enable 'definition-name ',name) | 1281 | (put ',enable 'definition-name ',name) |
| 1282 | (put ',disable 'definition-name ',name)))) | 1282 | (put ',disable 'definition-name ',name)))) |
| 1283 | 1283 | ||
| 1284 | (put 'define-erc-module 'doc-string-elt 3) | ||
| 1285 | |||
| 1286 | (defun erc-once-with-server-event (event &rest forms) | 1284 | (defun erc-once-with-server-event (event &rest forms) |
| 1287 | "Execute FORMS the next time EVENT occurs in the `current-buffer'. | 1285 | "Execute FORMS the next time EVENT occurs in the `current-buffer'. |
| 1288 | 1286 | ||
| @@ -1334,10 +1332,10 @@ connection over which the data was received that triggered EVENT." | |||
| 1334 | (add-hook hook fun nil nil) | 1332 | (add-hook hook fun nil nil) |
| 1335 | fun)) | 1333 | fun)) |
| 1336 | 1334 | ||
| 1337 | (defmacro erc-log (string) | 1335 | (defsubst erc-log (string) |
| 1338 | "Logs STRING if logging is on (see `erc-log-p')." | 1336 | "Logs STRING if logging is on (see `erc-log-p')." |
| 1339 | `(when erc-log-p | 1337 | (when erc-log-p |
| 1340 | (erc-log-aux ,string))) | 1338 | (erc-log-aux string))) |
| 1341 | 1339 | ||
| 1342 | (defun erc-server-buffer () | 1340 | (defun erc-server-buffer () |
| 1343 | "Return the server buffer for the current buffer's process. | 1341 | "Return the server buffer for the current buffer's process. |
| @@ -1621,6 +1619,7 @@ See `erc-get-buffer' for details. | |||
| 1621 | See also `with-current-buffer'. | 1619 | See also `with-current-buffer'. |
| 1622 | 1620 | ||
| 1623 | \(fn (TARGET [PROCESS]) BODY...)" | 1621 | \(fn (TARGET [PROCESS]) BODY...)" |
| 1622 | (declare (indent 1) (debug ((form &optional form) body))) | ||
| 1624 | (let ((buf (make-symbol "buf")) | 1623 | (let ((buf (make-symbol "buf")) |
| 1625 | (proc (make-symbol "proc")) | 1624 | (proc (make-symbol "proc")) |
| 1626 | (target (make-symbol "target")) | 1625 | (target (make-symbol "target")) |
| @@ -1637,8 +1636,6 @@ See also `with-current-buffer'. | |||
| 1637 | (when (buffer-live-p ,buf) | 1636 | (when (buffer-live-p ,buf) |
| 1638 | (with-current-buffer ,buf | 1637 | (with-current-buffer ,buf |
| 1639 | ,@body))))) | 1638 | ,@body))))) |
| 1640 | (put 'erc-with-buffer 'lisp-indent-function 1) | ||
| 1641 | (put 'erc-with-buffer 'edebug-form-spec '((form &optional form) body)) | ||
| 1642 | 1639 | ||
| 1643 | (defun erc-get-buffer (target &optional proc) | 1640 | (defun erc-get-buffer (target &optional proc) |
| 1644 | "Return the buffer matching TARGET in the process PROC. | 1641 | "Return the buffer matching TARGET in the process PROC. |
| @@ -1688,6 +1685,7 @@ needs to match PROC." | |||
| 1688 | FORMS will be evaluated in all buffers having the process PROCESS and | 1685 | FORMS will be evaluated in all buffers having the process PROCESS and |
| 1689 | where PRED matches or in all buffers of the server process if PRED is | 1686 | where PRED matches or in all buffers of the server process if PRED is |
| 1690 | nil." | 1687 | nil." |
| 1688 | (declare (indent 1) (debug (form form body))) | ||
| 1691 | ;; Make the evaluation have the correct order | 1689 | ;; Make the evaluation have the correct order |
| 1692 | (let ((pre (make-symbol "pre")) | 1690 | (let ((pre (make-symbol "pre")) |
| 1693 | (pro (make-symbol "pro"))) | 1691 | (pro (make-symbol "pro"))) |
| @@ -1701,8 +1699,6 @@ nil." | |||
| 1701 | ;; Silence the byte-compiler by binding the result of mapcar to | 1699 | ;; Silence the byte-compiler by binding the result of mapcar to |
| 1702 | ;; a variable. | 1700 | ;; a variable. |
| 1703 | res))) | 1701 | res))) |
| 1704 | (put 'erc-with-all-buffers-of-server 'lisp-indent-function 1) | ||
| 1705 | (put 'erc-with-all-buffers-of-server 'edebug-form-spec '(form form body)) | ||
| 1706 | 1702 | ||
| 1707 | ;; (iswitchb-mode) will autoload iswitchb.el | 1703 | ;; (iswitchb-mode) will autoload iswitchb.el |
| 1708 | (defvar iswitchb-temp-buflist) | 1704 | (defvar iswitchb-temp-buflist) |
diff --git a/src/ChangeLog b/src/ChangeLog index b822c7e6af1..398eda841fe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -80,8 +80,7 @@ | |||
| 80 | a file exists. This avoids expensive system calls on MS-Windows. | 80 | a file exists. This avoids expensive system calls on MS-Windows. |
| 81 | (Bug#12587) | 81 | (Bug#12587) |
| 82 | 82 | ||
| 83 | * w32.c (init_environment): Call 'check_existing' instead of | 83 | * w32.c (init_environment): Call 'check_existing' instead of 'stat'. |
| 84 | 'stat'. | ||
| 85 | 84 | ||
| 86 | * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to | 85 | * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to |
| 87 | determine whether a file exists and is not a directory. | 86 | determine whether a file exists and is not a directory. |
| @@ -299,8 +298,8 @@ | |||
| 299 | 298 | ||
| 300 | * w32heap.c: Include w32common.h. | 299 | * w32heap.c: Include w32common.h. |
| 301 | (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version) | 300 | (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version) |
| 302 | (w32_minor_version, w32_build_number, w32_subtype): Remove | 301 | (w32_minor_version, w32_build_number, w32_subtype): |
| 303 | duplicate definitions. | 302 | Remove duplicate definitions. |
| 304 | 303 | ||
| 305 | * w32fns.c: Include w32common.h; include w32heap.h only in | 304 | * w32fns.c: Include w32common.h; include w32heap.h only in |
| 306 | WINDOWSNT. | 305 | WINDOWSNT. |
| @@ -512,8 +511,8 @@ | |||
| 512 | 511 | ||
| 513 | * nsterm.m (ns_in_resize): Remove (Bug#12479). | 512 | * nsterm.m (ns_in_resize): Remove (Bug#12479). |
| 514 | (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. | 513 | (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. |
| 515 | (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove | 514 | (ns_clear_frame, sendEvent, windowDidResize, drawRect:): |
| 516 | ns_in_resize check. | 515 | Remove ns_in_resize check. |
| 517 | (ns_clear_frame_area): Remove resize handle code. | 516 | (ns_clear_frame_area): Remove resize handle code. |
| 518 | 517 | ||
| 519 | * nsfns.m (ns_in_resize): Remove. | 518 | * nsfns.m (ns_in_resize): Remove. |
| @@ -560,8 +559,8 @@ | |||
| 560 | * w32proc.c (stop_timer_thread): Fix declaration of 'err'. | 559 | * w32proc.c (stop_timer_thread): Fix declaration of 'err'. |
| 561 | 560 | ||
| 562 | * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so | 561 | * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so |
| 563 | that time stamps of directories could also be changed. Don't | 562 | that time stamps of directories could also be changed. |
| 564 | request the too broad GENERIC_WRITE, only the more restrictive | 563 | Don't request the too broad GENERIC_WRITE, only the more restrictive |
| 565 | FILE_WRITE_ATTRIBUTES access rights. | 564 | FILE_WRITE_ATTRIBUTES access rights. |
| 566 | 565 | ||
| 567 | * fileio.c (Fset_file_times): Special-case ignoring errors for | 566 | * fileio.c (Fset_file_times): Special-case ignoring errors for |