summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/shr.el19
-rw-r--r--lisp/net/soap-client.el25
-rw-r--r--lisp/net/soap-inspect.el3
3 files changed, 27 insertions, 20 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 58deaea6f53..a48d098fe26 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -203,6 +203,12 @@ cid: URL as the argument.")
(goto-char begin)
(shr-insert-document dom))))
+(defun shr--have-one-fringe-p ()
+ "Return non-nil if we know at least one of the fringes has non-zero width."
+ (and (fboundp 'fringe-columns)
+ (or (not (zerop (fringe-columns 'right)))
+ (not (zerop (fringe-columns 'left))))))
+
;;;###autoload
(defun shr-insert-document (dom)
"Render the parsed document DOM into the current buffer.
@@ -230,19 +236,13 @@ DOM should be a parse tree as generated by
(if (not shr-use-fonts)
(- (window-body-width) 1
(if (and (null shr-width)
- (or (zerop
- (fringe-columns 'right))
- (zerop
- (fringe-columns 'left))))
+ (not (shr--have-one-fringe-p)))
0
1))
(- (window-body-width nil t)
(* 2 (frame-char-width))
(if (and (null shr-width)
- (or (zerop
- (fringe-columns 'right))
- (zerop
- (fringe-columns 'left))))
+ (not (shr--have-one-fringe-p)))
(* (frame-char-width) 2)
0))))))
(shr-descend dom)
@@ -466,8 +466,7 @@ size, and full-buffer size."
;; to usurp one column for the
;; continuation glyph.
(if (and (null shr-width)
- (or (zerop (fringe-columns 'right))
- (zerop (fringe-columns 'left))))
+ (not (shr--have-one-fringe-p)))
(* (frame-char-width) 2)
0))))
(shr-insert text)
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 83173250137..71d42459974 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -1,14 +1,15 @@
-;;;; soap-client.el -- Access SOAP web services -*- lexical-binding: t -*-
+;;; soap-client.el --- Access SOAP web services -*- lexical-binding: t -*-
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
;; Created: December, 2009
-;; Version: 3.0.1
+;; Version: 3.0.2
;; Keywords: soap, web-services, comm, hypermedia
;; Package: soap-client
;; Homepage: https://github.com/alex-hhh/emacs-soap-client
+;; Package-Requires: ((cl-lib "0.5"))
;; This file is part of GNU Emacs.
@@ -43,6 +44,7 @@
;;; Code:
(eval-when-compile (require 'cl))
+(require 'cl-lib)
(require 'xml)
(require 'xsd-regexp)
@@ -57,8 +59,8 @@
(defsubst soap-warning (message &rest args)
"Display a warning MESSAGE with ARGS, using the 'soap-client warning type."
- (display-warning 'soap-client (apply #'format-message message args)
- :warning))
+ ;; Do not use #'format-message, to support older Emacs versions.
+ (display-warning 'soap-client (apply #'format message args) :warning))
(defgroup soap-client nil
"Access SOAP web services from Emacs."
@@ -1246,9 +1248,9 @@ See also `soap-wsdl-resolve-references'."
(error (push (cadr error-object) messages))))
(when messages
(error (mapconcat 'identity (nreverse messages) "; and: "))))
- (cl-flet ((fail-with-message (format value)
- (push (format format value) messages)
- (throw 'invalid nil)))
+ (cl-labels ((fail-with-message (format value)
+ (push (format format value) messages)
+ (throw 'invalid nil)))
(catch 'invalid
(let ((enumeration (soap-xs-simple-type-enumeration type)))
(when (and (> (length enumeration) 1)
@@ -2753,7 +2755,14 @@ decode function to perform the actual decoding."
;;;; Soap Envelope parsing
-(define-error 'soap-error "SOAP error")
+(if (fboundp 'define-error)
+ (define-error 'soap-error "SOAP error")
+ ;; Support older Emacs versions that do not have define-error, so
+ ;; that soap-client can remain unchanged in GNU ELPA.
+ (put 'soap-error
+ 'error-conditions
+ '(error soap-error))
+ (put 'soap-error 'error-message "SOAP error"))
(defun soap-parse-envelope (node operation wsdl)
"Parse the SOAP envelope in NODE and return the response.
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index b01e2bf76f1..a4430417ad0 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -1,10 +1,9 @@
-;;;; soap-inspect.el -- Interactive WSDL inspector -*- lexical-binding: t -*-
+;;; soap-inspect.el --- Interactive WSDL inspector -*- lexical-binding: t -*-
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
;; Created: October 2010
-;; Version: 3.0.1
;; Keywords: soap, web-services, comm, hypermedia
;; Package: soap-client
;; Homepage: https://github.com/alex-hhh/emacs-soap-client