X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2bef61c9f13a78d19f759f5a5300351adc96df1d..f6f3366160e26ff5984f287e60616ec9f90acfa3:/lisp/net/eudcb-ph.el?ds=sidebyside diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 055e0bf4ad..c0e4f81d31 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el @@ -1,18 +1,19 @@ ;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo ;; Maintainer: Pavel Janík ;; Keywords: comm +;; Package: eudc ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,9 +21,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -151,8 +150,7 @@ Wait for response and return the buffer containing it." (message "Contacting server...") (setq process (eudc-ph-open-session)) (if process - (save-excursion - (set-buffer (setq buffer (process-buffer process))) + (with-current-buffer (setq buffer (process-buffer process)) (eudc-ph-send-command process request) (message "Request sent, waiting for reply...") (eudc-ph-read-response process)))) @@ -175,11 +173,10 @@ SERVER is either a string naming the server or a list (NAME PORT)." (setq port (or (match-string 3 server) eudc-ph-default-server-port)) (setq eudc-ph-process-buffer (get-buffer-create (format " *PH-%s*" host))) - (save-excursion - (set-buffer eudc-ph-process-buffer) + (with-current-buffer eudc-ph-process-buffer (erase-buffer) (setq eudc-ph-read-point (point)) - (and eudc-xemacs-mule-p + (and (featurep 'xemacs) (featurep 'mule) (set-buffer-file-coding-system 'binary t))) (setq process (open-network-stream "ph" eudc-ph-process-buffer host port)) (if (null process) @@ -188,8 +185,7 @@ SERVER is either a string naming the server or a list (NAME PORT)." process))) (defun eudc-ph-close-session (process) - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (eudc-ph-send-command process "quit") (eudc-ph-read-response process) (run-at-time 2 nil 'delete-process process))) @@ -245,5 +241,5 @@ depending on RETURN-RESPONSE." (provide 'eudcb-ph) -;;; arch-tag: 4365bbf5-af20-453e-b5b6-2e7118ebfcdb +;; arch-tag: 4365bbf5-af20-453e-b5b6-2e7118ebfcdb ;;; eudcb-ph.el ends here