Commit 8599b23a authored by Stefan Monnier's avatar Stefan Monnier

* 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.
parent 9520f2f2
2012-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
* 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'.
* erc-backend.el (erc-log): Adjust autoload accordingly.
2012-10-07 Deniz Dogan <deniz@dogan.se>
* erc-log.el (erc-generate-log-file-name-function):
......@@ -42,8 +49,8 @@
2012-08-21 Julien Danjou <julien@danjou.info>
* erc-match.el (erc-match-message): Use
`erc-match-exclude-server-buffer' not
* erc-match.el (erc-match-message):
Use `erc-match-exclude-server-buffer' not
`erc-track-exclude-server-buffer'.
2012-08-20 Josh Feinstein <jlf@foxtail.org>
......@@ -56,8 +63,8 @@
(erc-lurker-threshold-time): New variables.
(erc-lurker-maybe-trim, erc-lurker-initialize, erc-lurker-cleanup)
(erc-hide-current-message-p, erc-canonicalize-server-name)
(erc-lurker-update-status, erc-lurker-p): New functions. Together
they maintain state about which users have spoken in the last
(erc-lurker-update-status, erc-lurker-p): New functions.
Together they maintain state about which users have spoken in the last
erc-lurker-threshold-time, with all other users being considered
lurkers whose messages of types in erc-lurker-hide-list will not
be displayed by erc-display-message.
......@@ -192,7 +199,7 @@
* erc.el (erc-ssl): Made into a synonym for erc-tls, which
provides a superset of the same functionality.
(erc-open-ssl-stream): Removed.
(erc-open-ssl-stream): Remove.
(erc-open-tls-stream): Use `open-network-stream' instead of
`open-tls-stream' directly to be able to use the built-in TLS
support.
......
......@@ -100,7 +100,7 @@
(require 'erc-compat)
(eval-when-compile (require 'cl))
(autoload 'erc-with-buffer "erc" nil nil 'macro)
(autoload 'erc-log "erc" nil nil 'macro)
(autoload 'erc-log "erc")
;;;; Variables and options
......
......@@ -362,13 +362,12 @@ nicknames with erc-server-user struct instances.")
(defmacro erc-with-server-buffer (&rest body)
"Execute BODY in the current ERC server buffer.
If no server buffer exists, return nil."
(declare (indent 0) (debug (body)))
(let ((buffer (make-symbol "buffer")))
`(let ((,buffer (erc-server-buffer)))
(when (buffer-live-p ,buffer)
(with-current-buffer ,buffer
,@body)))))
(put 'erc-with-server-buffer 'lisp-indent-function 0)
(put 'erc-with-server-buffer 'edebug-form-spec '(body))
(defstruct (erc-server-user (:type vector) :named)
;; User data
......@@ -1236,6 +1235,7 @@ Example:
'erc-replace-insert))
((remove-hook 'erc-insert-modify-hook
'erc-replace-insert)))"
(declare (doc-string 3))
(let* ((sn (symbol-name name))
(mode (intern (format "erc-%s-mode" (downcase sn))))
(group (intern (format "erc-%s" (downcase sn))))
......@@ -1281,8 +1281,6 @@ if ARG is omitted or nil.
(put ',enable 'definition-name ',name)
(put ',disable 'definition-name ',name))))
(put 'define-erc-module 'doc-string-elt 3)
(defun erc-once-with-server-event (event &rest forms)
"Execute FORMS the next time EVENT occurs in the `current-buffer'.
......@@ -1334,10 +1332,10 @@ connection over which the data was received that triggered EVENT."
(add-hook hook fun nil nil)
fun))
(defmacro erc-log (string)
(defsubst erc-log (string)
"Logs STRING if logging is on (see `erc-log-p')."
`(when erc-log-p
(erc-log-aux ,string)))
(when erc-log-p
(erc-log-aux string)))
(defun erc-server-buffer ()
"Return the server buffer for the current buffer's process.
......@@ -1621,6 +1619,7 @@ See `erc-get-buffer' for details.
See also `with-current-buffer'.
\(fn (TARGET [PROCESS]) BODY...)"
(declare (indent 1) (debug ((form &optional form) body)))
(let ((buf (make-symbol "buf"))
(proc (make-symbol "proc"))
(target (make-symbol "target"))
......@@ -1637,8 +1636,6 @@ See also `with-current-buffer'.
(when (buffer-live-p ,buf)
(with-current-buffer ,buf
,@body)))))
(put 'erc-with-buffer 'lisp-indent-function 1)
(put 'erc-with-buffer 'edebug-form-spec '((form &optional form) body))
(defun erc-get-buffer (target &optional proc)
"Return the buffer matching TARGET in the process PROC.
......@@ -1688,6 +1685,7 @@ needs to match PROC."
FORMS will be evaluated in all buffers having the process PROCESS and
where PRED matches or in all buffers of the server process if PRED is
nil."
(declare (indent 1) (debug (form form body)))
;; Make the evaluation have the correct order
(let ((pre (make-symbol "pre"))
(pro (make-symbol "pro")))
......@@ -1701,8 +1699,6 @@ nil."
;; Silence the byte-compiler by binding the result of mapcar to
;; a variable.
res)))
(put 'erc-with-all-buffers-of-server 'lisp-indent-function 1)
(put 'erc-with-all-buffers-of-server 'edebug-form-spec '(form form body))
;; (iswitchb-mode) will autoload iswitchb.el
(defvar iswitchb-temp-buflist)
......
......@@ -80,8 +80,7 @@
a file exists. This avoids expensive system calls on MS-Windows.
(Bug#12587)
* w32.c (init_environment): Call 'check_existing' instead of
'stat'.
* w32.c (init_environment): Call 'check_existing' instead of 'stat'.
* lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
determine whether a file exists and is not a directory.
......@@ -299,8 +298,8 @@
* w32heap.c: Include w32common.h.
(sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
(w32_minor_version, w32_build_number, w32_subtype): Remove
duplicate definitions.
(w32_minor_version, w32_build_number, w32_subtype):
Remove duplicate definitions.
* w32fns.c: Include w32common.h; include w32heap.h only in
WINDOWSNT.
......@@ -512,8 +511,8 @@
* nsterm.m (ns_in_resize): Remove (Bug#12479).
(ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
(ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove
ns_in_resize check.
(ns_clear_frame, sendEvent, windowDidResize, drawRect:):
Remove ns_in_resize check.
(ns_clear_frame_area): Remove resize handle code.
* nsfns.m (ns_in_resize): Remove.
......@@ -560,8 +559,8 @@
* w32proc.c (stop_timer_thread): Fix declaration of 'err'.
* w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
that time stamps of directories could also be changed. Don't
request the too broad GENERIC_WRITE, only the more restrictive
that time stamps of directories could also be changed.
Don't request the too broad GENERIC_WRITE, only the more restrictive
FILE_WRITE_ATTRIBUTES access rights.
* fileio.c (Fset_file_times): Special-case ignoring errors for
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment