summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/ldap.el6
-rw-r--r--lisp/net/rcirc.el44
2 files changed, 31 insertions, 19 deletions
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index 2a63615a602..18b96a7cce1 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -490,9 +490,11 @@ to try to connect to. Each host name may optionally be of the form HOST:PORT.
for each matching entry. If nil, return all available attributes.
`attrsonly', if non-nil, indicates that only attributes are retrieved,
not their associated values.
+ `auth' is one of the symbols `simple', `krbv41' or `krbv42'.
`base' is the base for the search as described in RFC 1779.
`scope' is one of the three symbols `sub', `base' or `one'.
`binddn' is the distinguished name of the user to bind as (in RFC 1779 syntax).
+ `auth' is one of the symbols `simple', `krbv41' or `krbv42'
`passwd' is the password to use for simple authentication.
`deref' is one of the symbols `never', `always', `search' or `find'.
`timelimit' is the timeout limit for the connection in seconds.
@@ -512,6 +514,7 @@ an alist of attribute/value pairs."
ldap-default-base))
(scope (plist-get search-plist 'scope))
(binddn (plist-get search-plist 'binddn))
+ (auth (plist-get search-plist 'auth))
(passwd (plist-get search-plist 'passwd))
(deref (plist-get search-plist 'deref))
(timelimit (plist-get search-plist 'timelimit))
@@ -541,6 +544,9 @@ an alist of attribute/value pairs."
(if (and binddn
(not (equal "" binddn)))
(setq arglist (nconc arglist (list (format "-D%s" binddn)))))
+ (if (and auth
+ (equal 'simple auth))
+ (setq arglist (nconc arglist (list "-x"))))
(if (and passwd
(not (equal "" passwd)))
(setq arglist (nconc arglist (list (format "-w%s" passwd)))))
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 8c678b6ae5f..a639afeecf8 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -142,7 +142,7 @@ number. If zero or nil, no truncating is done."
(integer :tag "Number of lines"))
:group 'rcirc)
-(defcustom rcirc-show-maximum-output t
+(defcustom rcirc-scroll-show-maximum-output t
"*If non-nil, scroll buffer to keep the point at the bottom of
the window."
:type 'boolean
@@ -762,8 +762,6 @@ If NOTICEP is non-nil, send a notice instead of privmsg."
(add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook nil t)
(add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook nil t)
- (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom nil t)
-
;; add to buffer list, and update buffer abbrevs
(when target ; skip server buffer
(let ((buffer (current-buffer)))
@@ -1166,14 +1164,6 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
(defvar rcirc-last-sender nil)
(make-variable-buffer-local 'rcirc-last-sender)
-(defun rcirc-scroll-to-bottom (window display-start)
- "Scroll window to show maximum output if `rcirc-show-maximum-output' is
-non-nil."
- (when rcirc-show-maximum-output
- (with-selected-window window
- (when (>= (window-point) rcirc-prompt-end-marker)
- (recenter -1)))))
-
(defun rcirc-print (process sender response target text &optional activity)
"Print TEXT in the buffer associated with TARGET.
Format based on SENDER and RESPONSE. If ACTIVITY is non-nil,
@@ -1252,17 +1242,33 @@ record activity."
;; set the window point for buffers show in windows
(walk-windows (lambda (w)
- (unless (eq (selected-window) w)
- (when (and (eq (current-buffer)
- (window-buffer w))
- (>= (window-point w)
- rcirc-prompt-end-marker))
- (set-window-point w (point-max)))))
+ (when (and (not (eq (selected-window) w))
+ (eq (current-buffer)
+ (window-buffer w))
+ (>= (window-point w)
+ rcirc-prompt-end-marker))
+ (set-window-point w (point-max))))
nil t)
;; restore the point
(goto-char (if moving rcirc-prompt-end-marker old-point))
+ ;; keep window on bottom line if it was already there
+ (when rcirc-scroll-show-maximum-output
+ (walk-windows (lambda (w)
+ (when (eq (window-buffer w) (current-buffer))
+ (with-current-buffer (window-buffer w)
+ (when (eq major-mode 'rcirc-mode)
+ (with-selected-window w
+ (when (<= (- (window-height)
+ (count-screen-lines
+ (window-point)
+ (window-start))
+ 1)
+ 0)
+ (recenter -1)))))))
+ nil t))
+
;; flush undo (can we do something smarter here?)
(buffer-disable-undo)
(buffer-enable-undo))
@@ -1545,8 +1551,8 @@ activity. Only run if the buffer is not visible and
(dolist (type rcirc-activity-types)
(rcirc-add-face 0 (length s)
(case type
- ('nick 'rcirc-track-nick)
- ('keyword 'rcirc-track-keyword))
+ (nick 'rcirc-track-nick)
+ (keyword 'rcirc-track-keyword))
s)))
s))
buffers ","))