+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):
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>
(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.
* 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.
(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
(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
'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))))
(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'.
(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.
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"))
(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.
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")))
;; 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)
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.
* 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.
* 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.
* 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