diff options
| -rw-r--r-- | lisp/net/dbus.el | 65 | ||||
| -rw-r--r-- | lisp/net/network-stream.el | 2 | ||||
| -rw-r--r-- | lisp/net/newsticker.el | 2 | ||||
| -rw-r--r-- | lisp/net/shr.el | 12 |
4 files changed, 37 insertions, 44 deletions
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 7a4ef1f7bcf..2d7cd2fc612 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; dbus.el --- Elisp bindings for D-Bus. | 1 | ;;; dbus.el --- Elisp bindings for D-Bus. -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2007-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2007-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -492,7 +492,7 @@ See `dbus-registered-objects-table' for a description of the | |||
| 492 | hash table." | 492 | hash table." |
| 493 | (let (result) | 493 | (let (result) |
| 494 | (maphash | 494 | (maphash |
| 495 | (lambda (key value) (add-to-list 'result (cons key value) 'append)) | 495 | (lambda (key value) (push (cons key value) result)) |
| 496 | dbus-registered-objects-table) | 496 | dbus-registered-objects-table) |
| 497 | result)) | 497 | result)) |
| 498 | 498 | ||
| @@ -1113,9 +1113,9 @@ unique names for services." | |||
| 1113 | "Retrieve all services which correspond to a known name in BUS. | 1113 | "Retrieve all services which correspond to a known name in BUS. |
| 1114 | A service has a known name if it doesn't start with \":\"." | 1114 | A service has a known name if it doesn't start with \":\"." |
| 1115 | (let (result) | 1115 | (let (result) |
| 1116 | (dolist (name (dbus-list-names bus) result) | 1116 | (dolist (name (dbus-list-names bus) (nreverse result)) |
| 1117 | (unless (string-equal ":" (substring name 0 1)) | 1117 | (unless (string-equal ":" (substring name 0 1)) |
| 1118 | (add-to-list 'result name 'append))))) | 1118 | (push name result))))) |
| 1119 | 1119 | ||
| 1120 | (defun dbus-list-queued-owners (bus service) | 1120 | (defun dbus-list-queued-owners (bus service) |
| 1121 | "Return the unique names registered at D-Bus BUS and queued for SERVICE. | 1121 | "Return the unique names registered at D-Bus BUS and queued for SERVICE. |
| @@ -1214,9 +1214,8 @@ It returns a list of strings. The node names stand for further | |||
| 1214 | object paths of the D-Bus service." | 1214 | object paths of the D-Bus service." |
| 1215 | (let ((object (dbus-introspect-xml bus service path)) | 1215 | (let ((object (dbus-introspect-xml bus service path)) |
| 1216 | result) | 1216 | result) |
| 1217 | (dolist (elt (xml-get-children object 'node) result) | 1217 | (dolist (elt (xml-get-children object 'node) (nreverse result)) |
| 1218 | (add-to-list | 1218 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1219 | 'result (dbus-introspect-get-attribute elt "name") 'append)))) | ||
| 1220 | 1219 | ||
| 1221 | (defun dbus-introspect-get-all-nodes (bus service path) | 1220 | (defun dbus-introspect-get-all-nodes (bus service path) |
| 1222 | "Return all node names of SERVICE in D-Bus BUS at object path PATH. | 1221 | "Return all node names of SERVICE in D-Bus BUS at object path PATH. |
| @@ -1240,9 +1239,8 @@ interface is \"org.freedesktop.DBus.Properties\". If present, | |||
| 1240 | children, beside \"method\" and \"signal\" objects." | 1239 | children, beside \"method\" and \"signal\" objects." |
| 1241 | (let ((object (dbus-introspect-xml bus service path)) | 1240 | (let ((object (dbus-introspect-xml bus service path)) |
| 1242 | result) | 1241 | result) |
| 1243 | (dolist (elt (xml-get-children object 'interface) result) | 1242 | (dolist (elt (xml-get-children object 'interface) (nreverse result)) |
| 1244 | (add-to-list | 1243 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1245 | 'result (dbus-introspect-get-attribute elt "name") 'append)))) | ||
| 1246 | 1244 | ||
| 1247 | (defun dbus-introspect-get-interface (bus service path interface) | 1245 | (defun dbus-introspect-get-interface (bus service path interface) |
| 1248 | "Return the INTERFACE of SERVICE in D-Bus BUS at object path PATH. | 1246 | "Return the INTERFACE of SERVICE in D-Bus BUS at object path PATH. |
| @@ -1264,9 +1262,8 @@ The resulting \"interface\" object can contain \"method\", \"signal\", | |||
| 1264 | SERVICE is a service of D-Bus BUS at object path PATH." | 1262 | SERVICE is a service of D-Bus BUS at object path PATH." |
| 1265 | (let ((object (dbus-introspect-get-interface bus service path interface)) | 1263 | (let ((object (dbus-introspect-get-interface bus service path interface)) |
| 1266 | result) | 1264 | result) |
| 1267 | (dolist (elt (xml-get-children object 'method) result) | 1265 | (dolist (elt (xml-get-children object 'method) (nreverse result)) |
| 1268 | (add-to-list | 1266 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1269 | 'result (dbus-introspect-get-attribute elt "name") 'append)))) | ||
| 1270 | 1267 | ||
| 1271 | (defun dbus-introspect-get-method (bus service path interface method) | 1268 | (defun dbus-introspect-get-method (bus service path interface method) |
| 1272 | "Return method METHOD of interface INTERFACE as XML object. | 1269 | "Return method METHOD of interface INTERFACE as XML object. |
| @@ -1288,9 +1285,8 @@ object can contain \"arg\" and \"annotation\" children." | |||
| 1288 | SERVICE is a service of D-Bus BUS at object path PATH." | 1285 | SERVICE is a service of D-Bus BUS at object path PATH." |
| 1289 | (let ((object (dbus-introspect-get-interface bus service path interface)) | 1286 | (let ((object (dbus-introspect-get-interface bus service path interface)) |
| 1290 | result) | 1287 | result) |
| 1291 | (dolist (elt (xml-get-children object 'signal) result) | 1288 | (dolist (elt (xml-get-children object 'signal) (nreverse result)) |
| 1292 | (add-to-list | 1289 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1293 | 'result (dbus-introspect-get-attribute elt "name") 'append)))) | ||
| 1294 | 1290 | ||
| 1295 | (defun dbus-introspect-get-signal (bus service path interface signal) | 1291 | (defun dbus-introspect-get-signal (bus service path interface signal) |
| 1296 | "Return signal SIGNAL of interface INTERFACE as XML object. | 1292 | "Return signal SIGNAL of interface INTERFACE as XML object. |
| @@ -1312,9 +1308,8 @@ object can contain \"arg\" and \"annotation\" children." | |||
| 1312 | SERVICE is a service of D-Bus BUS at object path PATH." | 1308 | SERVICE is a service of D-Bus BUS at object path PATH." |
| 1313 | (let ((object (dbus-introspect-get-interface bus service path interface)) | 1309 | (let ((object (dbus-introspect-get-interface bus service path interface)) |
| 1314 | result) | 1310 | result) |
| 1315 | (dolist (elt (xml-get-children object 'property) result) | 1311 | (dolist (elt (xml-get-children object 'property) (nreverse result)) |
| 1316 | (add-to-list | 1312 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1317 | 'result (dbus-introspect-get-attribute elt "name") 'append)))) | ||
| 1318 | 1313 | ||
| 1319 | (defun dbus-introspect-get-property (bus service path interface property) | 1314 | (defun dbus-introspect-get-property (bus service path interface property) |
| 1320 | "This function returns PROPERTY of INTERFACE as XML object. | 1315 | "This function returns PROPERTY of INTERFACE as XML object. |
| @@ -1345,9 +1340,8 @@ object, where the annotations belong to." | |||
| 1345 | (dbus-introspect-get-property bus service path interface name)) | 1340 | (dbus-introspect-get-property bus service path interface name)) |
| 1346 | (dbus-introspect-get-interface bus service path interface))) | 1341 | (dbus-introspect-get-interface bus service path interface))) |
| 1347 | result) | 1342 | result) |
| 1348 | (dolist (elt (xml-get-children object 'annotation) result) | 1343 | (dolist (elt (xml-get-children object 'annotation) (nreverse result)) |
| 1349 | (add-to-list | 1344 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1350 | 'result (dbus-introspect-get-attribute elt "name") 'append)))) | ||
| 1351 | 1345 | ||
| 1352 | (defun dbus-introspect-get-annotation | 1346 | (defun dbus-introspect-get-annotation |
| 1353 | (bus service path interface name annotation) | 1347 | (bus service path interface name annotation) |
| @@ -1382,9 +1376,8 @@ therefore, even if the method or signal has arguments." | |||
| 1382 | (or (dbus-introspect-get-method bus service path interface name) | 1376 | (or (dbus-introspect-get-method bus service path interface name) |
| 1383 | (dbus-introspect-get-signal bus service path interface name))) | 1377 | (dbus-introspect-get-signal bus service path interface name))) |
| 1384 | result) | 1378 | result) |
| 1385 | (dolist (elt (xml-get-children object 'arg) result) | 1379 | (dolist (elt (xml-get-children object 'arg) (nreverse result)) |
| 1386 | (add-to-list | 1380 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1387 | 'result (dbus-introspect-get-attribute elt "name") 'append)))) | ||
| 1388 | 1381 | ||
| 1389 | (defun dbus-introspect-get-argument (bus service path interface name arg) | 1382 | (defun dbus-introspect-get-argument (bus service path interface name arg) |
| 1390 | "Return argument ARG as XML object. | 1383 | "Return argument ARG as XML object. |
| @@ -1473,8 +1466,8 @@ nil is returned." | |||
| 1473 | (dbus-call-method | 1466 | (dbus-call-method |
| 1474 | bus service path dbus-interface-properties | 1467 | bus service path dbus-interface-properties |
| 1475 | "GetAll" :timeout 500 interface) | 1468 | "GetAll" :timeout 500 interface) |
| 1476 | result) | 1469 | (nreverse result)) |
| 1477 | (add-to-list 'result (cons (car dict) (cl-caadr dict)) 'append))))) | 1470 | (push (cons (car dict) (cl-caadr dict)) result))))) |
| 1478 | 1471 | ||
| 1479 | (defun dbus-register-property | 1472 | (defun dbus-register-property |
| 1480 | (bus service path interface property access value | 1473 | (bus service path interface property access value |
| @@ -1609,11 +1602,11 @@ It will be registered for all objects created by `dbus-register-property'." | |||
| 1609 | (when (and (equal (butlast key) (list :property bus interface)) | 1602 | (when (and (equal (butlast key) (list :property bus interface)) |
| 1610 | (string-equal path (nth 2 (car val))) | 1603 | (string-equal path (nth 2 (car val))) |
| 1611 | (not (functionp (car (last (car val)))))) | 1604 | (not (functionp (car (last (car val)))))) |
| 1612 | (add-to-list | 1605 | (push |
| 1613 | 'result | ||
| 1614 | (list :dict-entry | 1606 | (list :dict-entry |
| 1615 | (car (last key)) | 1607 | (car (last key)) |
| 1616 | (list :variant (cdar (last (car val)))))))) | 1608 | (list :variant (cdar (last (car val))))) |
| 1609 | result))) | ||
| 1617 | dbus-registered-objects-table) | 1610 | dbus-registered-objects-table) |
| 1618 | ;; Return the result, or an empty array. | 1611 | ;; Return the result, or an empty array. |
| 1619 | (list :array (or result '(:signature "{sv}")))))))) | 1612 | (list :array (or result '(:signature "{sv}")))))))) |
| @@ -1684,12 +1677,12 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow." | |||
| 1684 | (interface | 1677 | (interface |
| 1685 | (dbus-introspect-get-interface-names bus service object) | 1678 | (dbus-introspect-get-interface-names bus service object) |
| 1686 | result1) | 1679 | result1) |
| 1687 | (add-to-list | 1680 | (push |
| 1688 | 'result1 | ||
| 1689 | (cons interface | 1681 | (cons interface |
| 1690 | (dbus-get-all-properties bus service object interface)))) | 1682 | (dbus-get-all-properties bus service object interface)) |
| 1683 | result1)) | ||
| 1691 | (when result1 | 1684 | (when result1 |
| 1692 | (add-to-list 'result (cons object result1)))))))) | 1685 | (push (cons object result1) result))))))) |
| 1693 | 1686 | ||
| 1694 | (defun dbus-managed-objects-handler () | 1687 | (defun dbus-managed-objects-handler () |
| 1695 | "Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface. | 1688 | "Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface. |
| @@ -1705,7 +1698,7 @@ It will be registered for all objects created by `dbus-register-service'." | |||
| 1705 | (lambda (key val) | 1698 | (lambda (key val) |
| 1706 | (when (and (equal (butlast key 2) (list :method bus)) | 1699 | (when (and (equal (butlast key 2) (list :method bus)) |
| 1707 | (null (nth 2 (car-safe val)))) | 1700 | (null (nth 2 (car-safe val)))) |
| 1708 | (add-to-list 'interfaces (nth 2 key)))) | 1701 | (push (nth 2 key) interfaces))) |
| 1709 | dbus-registered-objects-table) | 1702 | dbus-registered-objects-table) |
| 1710 | 1703 | ||
| 1711 | ;; Check all registered object paths. | 1704 | ;; Check all registered object paths. |
| @@ -1716,7 +1709,7 @@ It will be registered for all objects created by `dbus-register-service'." | |||
| 1716 | (string-prefix-p path object)) | 1709 | (string-prefix-p path object)) |
| 1717 | (dolist (interface (cons (nth 2 key) interfaces)) | 1710 | (dolist (interface (cons (nth 2 key) interfaces)) |
| 1718 | (unless (assoc object result) | 1711 | (unless (assoc object result) |
| 1719 | (add-to-list 'result (list object))) | 1712 | (push (list object) result)) |
| 1720 | (unless (assoc interface (cdr (assoc object result))) | 1713 | (unless (assoc interface (cdr (assoc object result))) |
| 1721 | (setcdr | 1714 | (setcdr |
| 1722 | (assoc object result) | 1715 | (assoc object result) |
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index c2845d96a5d..50991fddcfd 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; network-stream.el --- open network processes, possibly with encryption | 1 | ;;; network-stream.el --- open network processes, possibly with encryption -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2010-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el index 66b7a69aae8..7eff422e4ea 100644 --- a/lisp/net/newsticker.el +++ b/lisp/net/newsticker.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; newsticker.el --- A Newsticker for Emacs. | 1 | ;;; newsticker.el --- A Newsticker for Emacs. -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index a3cc8072a01..7ea33fb2d3e 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; shr.el --- Simple HTML Renderer | 1 | ;;; shr.el --- Simple HTML Renderer -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2010-2016 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2010-2016 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -1582,7 +1582,7 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1582 | (max-height (and edges | 1582 | (max-height (and edges |
| 1583 | (truncate (* shr-max-image-proportion | 1583 | (truncate (* shr-max-image-proportion |
| 1584 | (- (nth 3 edges) (nth 1 edges)))))) | 1584 | (- (nth 3 edges) (nth 1 edges)))))) |
| 1585 | svg image) | 1585 | svg) |
| 1586 | (when (and max-width | 1586 | (when (and max-width |
| 1587 | (> width max-width)) | 1587 | (> width max-width)) |
| 1588 | (setq height (truncate (* (/ (float max-width) width) height)) | 1588 | (setq height (truncate (* (/ (float max-width) width) height)) |
| @@ -1919,7 +1919,7 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1919 | (dolist (column row) | 1919 | (dolist (column row) |
| 1920 | (setq max (max max (nth 2 column)))) | 1920 | (setq max (max max (nth 2 column)))) |
| 1921 | max))) | 1921 | max))) |
| 1922 | (dotimes (i (max height 1)) | 1922 | (dotimes (_ (max height 1)) |
| 1923 | (shr-indent) | 1923 | (shr-indent) |
| 1924 | (insert shr-table-vertical-line "\n")) | 1924 | (insert shr-table-vertical-line "\n")) |
| 1925 | (dolist (column row) | 1925 | (dolist (column row) |
| @@ -1927,7 +1927,7 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1927 | (goto-char start) | 1927 | (goto-char start) |
| 1928 | ;; Sum up all the widths from the column. (There may be | 1928 | ;; Sum up all the widths from the column. (There may be |
| 1929 | ;; more than one if this is a "colspan" column.) | 1929 | ;; more than one if this is a "colspan" column.) |
| 1930 | (dotimes (i (nth 4 column)) | 1930 | (dotimes (_ (nth 4 column)) |
| 1931 | ;; The colspan directive may be wrong and there may not be | 1931 | ;; The colspan directive may be wrong and there may not be |
| 1932 | ;; that number of columns. | 1932 | ;; that number of columns. |
| 1933 | (when (<= column-number (1- (length widths))) | 1933 | (when (<= column-number (1- (length widths))) |
| @@ -1958,7 +1958,7 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1958 | (forward-line 1)) | 1958 | (forward-line 1)) |
| 1959 | ;; Add blank lines at padding at the bottom of the TD, | 1959 | ;; Add blank lines at padding at the bottom of the TD, |
| 1960 | ;; possibly. | 1960 | ;; possibly. |
| 1961 | (dotimes (i (- height (length lines))) | 1961 | (dotimes (_ (- height (length lines))) |
| 1962 | (end-of-line) | 1962 | (end-of-line) |
| 1963 | (let ((start (point))) | 1963 | (let ((start (point))) |
| 1964 | (insert (propertize " " | 1964 | (insert (propertize " " |
| @@ -2140,7 +2140,7 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 2140 | (push data tds))))) | 2140 | (push data tds))))) |
| 2141 | (when (and colspan | 2141 | (when (and colspan |
| 2142 | (> colspan 1)) | 2142 | (> colspan 1)) |
| 2143 | (dotimes (c (1- colspan)) | 2143 | (dotimes (_ (1- colspan)) |
| 2144 | (setq i (1+ i)) | 2144 | (setq i (1+ i)) |
| 2145 | (push | 2145 | (push |
| 2146 | (if fill | 2146 | (if fill |