diff options
| author | Glenn Morris | 2020-06-17 08:47:53 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-06-17 08:47:53 -0700 |
| commit | 21b03faed44913ba0b0e3d54d2ffdb0ac067fae8 (patch) | |
| tree | 305caea08574a7d747e692e1ed1c023606502671 /lisp | |
| parent | 9682aa2f2493c89af1894ad2d52543d57f4958a5 (diff) | |
| parent | 229995ba2cd9f6d0a749a38c106cbfbfd04119a8 (diff) | |
| download | emacs-21b03faed44913ba0b0e3d54d2ffdb0ac067fae8.tar.gz emacs-21b03faed44913ba0b0e3d54d2ffdb0ac067fae8.zip | |
Merge from origin/emacs-27
229995ba2c (origin/emacs-27) Fix some Texinfo markup
01e86b9fdf Fix recentf typo in Emacs manual
cd4f75bb86 Rename default function to next-error-buffer-unnavigated-c...
1dff0a8949 * lisp/image-mode.el (image-toggle-display-image): Fix fit...
a71d1787f1 * doc/misc/tramp.texi (Predefined connection information):...
079b0dc430 Delete, don't kill, dir dir fragments in icomplete-fido-ba...
6cdecc2659 Revert markup change in with-coding-priority docs
22f4fba8a9 * lisp/emulation/cua-rect.el (cua--rectangle-region-insert...
6b9eac6759 * lisp/simple.el (shell-command-on-region): Fix docstring.
43ad7dc1af Clean up D-Bus documentation (bug#41744)
c43e5ed60d * lisp/image-mode.el (image-transform-original): New comma...
6eb18a950d Move tab-bar and tab-line faces to faces.el (part of bug#4...
# Conflicts:
# etc/NEWS
# lisp/simple.el
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emulation/cua-rect.el | 6 | ||||
| -rw-r--r-- | lisp/faces.el | 27 | ||||
| -rw-r--r-- | lisp/icomplete.el | 5 | ||||
| -rw-r--r-- | lisp/image-mode.el | 32 | ||||
| -rw-r--r-- | lisp/net/dbus.el | 228 | ||||
| -rw-r--r-- | lisp/simple.el | 16 | ||||
| -rw-r--r-- | lisp/tab-bar.el | 15 | ||||
| -rw-r--r-- | lisp/tab-line.el | 16 |
8 files changed, 188 insertions, 157 deletions
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e99bb33dfb1..663995a0a11 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el | |||
| @@ -1412,7 +1412,7 @@ With prefix arg, indent to that column." | |||
| 1412 | (add-function :around region-extract-function | 1412 | (add-function :around region-extract-function |
| 1413 | #'cua--rectangle-region-extract) | 1413 | #'cua--rectangle-region-extract) |
| 1414 | (add-function :around region-insert-function | 1414 | (add-function :around region-insert-function |
| 1415 | #'cua--insert-rectangle) | 1415 | #'cua--rectangle-region-insert) |
| 1416 | (add-function :around redisplay-highlight-region-function | 1416 | (add-function :around redisplay-highlight-region-function |
| 1417 | #'cua--rectangle-highlight-for-redisplay) | 1417 | #'cua--rectangle-highlight-for-redisplay) |
| 1418 | 1418 | ||
| @@ -1422,6 +1422,10 @@ With prefix arg, indent to that column." | |||
| 1422 | ;; already do it elsewhere. | 1422 | ;; already do it elsewhere. |
| 1423 | (funcall redisplay-unhighlight-region-function (nth 3 args)))) | 1423 | (funcall redisplay-unhighlight-region-function (nth 3 args)))) |
| 1424 | 1424 | ||
| 1425 | (defun cua--rectangle-region-insert (orig &rest args) | ||
| 1426 | (if (not cua--rectangle) (apply orig args) | ||
| 1427 | (funcall #'cua--insert-rectangle (car args)))) | ||
| 1428 | |||
| 1425 | (defun cua--rectangle-region-extract (orig &optional delete) | 1429 | (defun cua--rectangle-region-extract (orig &optional delete) |
| 1426 | (cond | 1430 | (cond |
| 1427 | ((not cua--rectangle) | 1431 | ((not cua--rectangle) |
diff --git a/lisp/faces.el b/lisp/faces.el index 8c3e464cb86..f6b9593b9df 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2758,6 +2758,33 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2758 | :version "21.1" | 2758 | :version "21.1" |
| 2759 | :group 'basic-faces) | 2759 | :group 'basic-faces) |
| 2760 | 2760 | ||
| 2761 | (defface tab-bar | ||
| 2762 | '((((class color) (min-colors 88)) | ||
| 2763 | :inherit variable-pitch | ||
| 2764 | :background "grey85" | ||
| 2765 | :foreground "black") | ||
| 2766 | (((class mono)) | ||
| 2767 | :background "grey") | ||
| 2768 | (t | ||
| 2769 | :inverse-video t)) | ||
| 2770 | "Tab bar face." | ||
| 2771 | :version "27.1" | ||
| 2772 | :group 'basic-faces) | ||
| 2773 | |||
| 2774 | (defface tab-line | ||
| 2775 | '((((class color) (min-colors 88)) | ||
| 2776 | :inherit variable-pitch | ||
| 2777 | :height 0.9 | ||
| 2778 | :background "grey85" | ||
| 2779 | :foreground "black") | ||
| 2780 | (((class mono)) | ||
| 2781 | :background "grey") | ||
| 2782 | (t | ||
| 2783 | :inverse-video t)) | ||
| 2784 | "Tab line face." | ||
| 2785 | :version "27.1" | ||
| 2786 | :group 'basic-faces) | ||
| 2787 | |||
| 2761 | (defface menu | 2788 | (defface menu |
| 2762 | '((((type tty)) | 2789 | '((((type tty)) |
| 2763 | :inverse-video t) | 2790 | :inverse-video t) |
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 60ef0247bae..3747ae3d281 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -300,7 +300,10 @@ if that doesn't produce a completion match." | |||
| 300 | (interactive) | 300 | (interactive) |
| 301 | (if (and (eq (char-before) ?/) | 301 | (if (and (eq (char-before) ?/) |
| 302 | (eq (icomplete--category) 'file)) | 302 | (eq (icomplete--category) 'file)) |
| 303 | (zap-up-to-char -1 ?/) | 303 | (save-excursion |
| 304 | (goto-char (1- (point))) | ||
| 305 | (when (search-backward "/" (point-min) t) | ||
| 306 | (delete-region (1+ (point)) (point-max)))) | ||
| 304 | (call-interactively 'backward-delete-char))) | 307 | (call-interactively 'backward-delete-char))) |
| 305 | 308 | ||
| 306 | (defvar icomplete-fido-mode-map | 309 | (defvar icomplete-fido-mode-map |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 480b2e6b26e..1bb213c2489 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -456,6 +456,7 @@ call." | |||
| 456 | (define-key map "sb" 'image-transform-fit-both) | 456 | (define-key map "sb" 'image-transform-fit-both) |
| 457 | (define-key map "ss" 'image-transform-set-scale) | 457 | (define-key map "ss" 'image-transform-set-scale) |
| 458 | (define-key map "sr" 'image-transform-set-rotation) | 458 | (define-key map "sr" 'image-transform-set-rotation) |
| 459 | (define-key map "so" 'image-transform-original) | ||
| 459 | (define-key map "s0" 'image-transform-reset) | 460 | (define-key map "s0" 'image-transform-reset) |
| 460 | 461 | ||
| 461 | ;; Multi-frame keys | 462 | ;; Multi-frame keys |
| @@ -521,8 +522,10 @@ call." | |||
| 521 | :help "Rotate the image"] | 522 | :help "Rotate the image"] |
| 522 | ["Set Rotation..." image-transform-set-rotation | 523 | ["Set Rotation..." image-transform-set-rotation |
| 523 | :help "Set rotation angle of the image"] | 524 | :help "Set rotation angle of the image"] |
| 524 | ["Reset Transformations" image-transform-reset | 525 | ["Original Size" image-transform-original |
| 525 | :help "Reset all image transformations"] | 526 | :help "Reset image to actual size"] |
| 527 | ["Reset to Default Size" image-transform-reset | ||
| 528 | :help "Reset all image transformations to initial size"] | ||
| 526 | "--" | 529 | "--" |
| 527 | ["Show Thumbnails" | 530 | ["Show Thumbnails" |
| 528 | (lambda () | 531 | (lambda () |
| @@ -807,8 +810,12 @@ was inserted." | |||
| 807 | filename)) | 810 | filename)) |
| 808 | ;; If we have a `fit-width' or a `fit-height', don't limit | 811 | ;; If we have a `fit-width' or a `fit-height', don't limit |
| 809 | ;; the size of the image to the window size. | 812 | ;; the size of the image to the window size. |
| 810 | (edges (and (eq image-transform-resize t) | 813 | (edges (when (eq image-transform-resize t) |
| 811 | (window-inside-pixel-edges (get-buffer-window)))) | 814 | (window-inside-pixel-edges (get-buffer-window)))) |
| 815 | (max-width (when edges | ||
| 816 | (- (nth 2 edges) (nth 0 edges)))) | ||
| 817 | (max-height (when edges | ||
| 818 | (- (nth 3 edges) (nth 1 edges)))) | ||
| 812 | (type (if (image--imagemagick-wanted-p filename) | 819 | (type (if (image--imagemagick-wanted-p filename) |
| 813 | 'imagemagick | 820 | 'imagemagick |
| 814 | (image-type file-or-data nil data-p))) | 821 | (image-type file-or-data nil data-p))) |
| @@ -824,14 +831,18 @@ was inserted." | |||
| 824 | (ignore-error exif-error | 831 | (ignore-error exif-error |
| 825 | (exif-parse-buffer))) | 832 | (exif-parse-buffer))) |
| 826 | 0.0))) | 833 | 0.0))) |
| 834 | ;; Swap width and height when changing orientation | ||
| 835 | ;; between portrait and landscape. | ||
| 836 | (when (and edges (zerop (mod (+ image-transform-rotation 90) 180))) | ||
| 837 | (setq max-width (prog1 max-height (setq max-height max-width)))) | ||
| 827 | 838 | ||
| 828 | ;; :scale 1: If we do not set this, create-image will apply | 839 | ;; :scale 1: If we do not set this, create-image will apply |
| 829 | ;; default scaling based on font size. | 840 | ;; default scaling based on font size. |
| 830 | (setq image (if (not edges) | 841 | (setq image (if (not edges) |
| 831 | (create-image file-or-data type data-p :scale 1) | 842 | (create-image file-or-data type data-p :scale 1) |
| 832 | (create-image file-or-data type data-p :scale 1 | 843 | (create-image file-or-data type data-p :scale 1 |
| 833 | :max-width (- (nth 2 edges) (nth 0 edges)) | 844 | :max-width max-width |
| 834 | :max-height (- (nth 3 edges) (nth 1 edges))))) | 845 | :max-height max-height))) |
| 835 | 846 | ||
| 836 | ;; Discard any stale image data before looking it up again. | 847 | ;; Discard any stale image data before looking it up again. |
| 837 | (image-flush image) | 848 | (image-flush image) |
| @@ -1382,8 +1393,15 @@ ROTATION should be in degrees." | |||
| 1382 | (setq image-transform-rotation (float (mod rotation 360))) | 1393 | (setq image-transform-rotation (float (mod rotation 360))) |
| 1383 | (image-toggle-display-image)) | 1394 | (image-toggle-display-image)) |
| 1384 | 1395 | ||
| 1396 | (defun image-transform-original () | ||
| 1397 | "Display the current image with the original (actual) size and rotation." | ||
| 1398 | (interactive) | ||
| 1399 | (setq image-transform-resize nil | ||
| 1400 | image-transform-scale 1) | ||
| 1401 | (image-toggle-display-image)) | ||
| 1402 | |||
| 1385 | (defun image-transform-reset () | 1403 | (defun image-transform-reset () |
| 1386 | "Display the current image with the default size and rotation." | 1404 | "Display the current image with the default (initial) size and rotation." |
| 1387 | (interactive) | 1405 | (interactive) |
| 1388 | (setq image-transform-resize image-auto-resize | 1406 | (setq image-transform-resize image-auto-resize |
| 1389 | image-transform-rotation 0.0 | 1407 | image-transform-rotation 0.0 |
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 4538399c751..06bd9e567fe 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -182,7 +182,7 @@ caught in `condition-case' by `dbus-error'.") | |||
| 182 | ;;; Basic D-Bus message functions. | 182 | ;;; Basic D-Bus message functions. |
| 183 | 183 | ||
| 184 | (defvar dbus-return-values-table (make-hash-table :test 'equal) | 184 | (defvar dbus-return-values-table (make-hash-table :test 'equal) |
| 185 | "Hash table for temporary storing arguments of reply messages. | 185 | "Hash table for temporarily storing arguments of reply messages. |
| 186 | A key in this hash table is a list (:serial BUS SERIAL), like in | 186 | A key in this hash table is a list (:serial BUS SERIAL), like in |
| 187 | `dbus-registered-objects-table'. BUS is either a Lisp symbol, | 187 | `dbus-registered-objects-table'. BUS is either a Lisp symbol, |
| 188 | `:system' or `:session', or a string denoting the bus address. | 188 | `:system' or `:session', or a string denoting the bus address. |
| @@ -225,10 +225,10 @@ SERVICE is the D-Bus service name to be used. PATH is the D-Bus | |||
| 225 | object path SERVICE is registered at. INTERFACE is an interface | 225 | object path SERVICE is registered at. INTERFACE is an interface |
| 226 | offered by SERVICE. It must provide METHOD. | 226 | offered by SERVICE. It must provide METHOD. |
| 227 | 227 | ||
| 228 | If the parameter `:timeout' is given, the following integer TIMEOUT | 228 | If the parameter `:timeout' is given, the following integer |
| 229 | specifies the maximum number of milliseconds the method call must | 229 | TIMEOUT specifies the maximum number of milliseconds before the |
| 230 | return. The default value is 25,000. If the method call doesn't | 230 | method call must return. The default value is 25,000. If the |
| 231 | return in time, a D-Bus error is raised. | 231 | method call doesn't return in time, a D-Bus error is raised. |
| 232 | 232 | ||
| 233 | All other arguments ARGS are passed to METHOD as arguments. They are | 233 | All other arguments ARGS are passed to METHOD as arguments. They are |
| 234 | converted into D-Bus types via the following rules: | 234 | converted into D-Bus types via the following rules: |
| @@ -248,14 +248,14 @@ Lisp objects. The type conversion happens the other direction as for | |||
| 248 | input arguments. It follows the mapping rules: | 248 | input arguments. It follows the mapping rules: |
| 249 | 249 | ||
| 250 | DBUS_TYPE_BOOLEAN => t or nil | 250 | DBUS_TYPE_BOOLEAN => t or nil |
| 251 | DBUS_TYPE_BYTE => number | 251 | DBUS_TYPE_BYTE => natural number |
| 252 | DBUS_TYPE_UINT16 => number | 252 | DBUS_TYPE_UINT16 => natural number |
| 253 | DBUS_TYPE_INT16 => integer | 253 | DBUS_TYPE_INT16 => integer |
| 254 | DBUS_TYPE_UINT32 => number or float | 254 | DBUS_TYPE_UINT32 => natural number |
| 255 | DBUS_TYPE_UNIX_FD => number or float | 255 | DBUS_TYPE_UNIX_FD => natural number |
| 256 | DBUS_TYPE_INT32 => integer or float | 256 | DBUS_TYPE_INT32 => integer |
| 257 | DBUS_TYPE_UINT64 => number or float | 257 | DBUS_TYPE_UINT64 => natural number |
| 258 | DBUS_TYPE_INT64 => integer or float | 258 | DBUS_TYPE_INT64 => integer |
| 259 | DBUS_TYPE_DOUBLE => float | 259 | DBUS_TYPE_DOUBLE => float |
| 260 | DBUS_TYPE_STRING => string | 260 | DBUS_TYPE_STRING => string |
| 261 | DBUS_TYPE_OBJECT_PATH => string | 261 | DBUS_TYPE_OBJECT_PATH => string |
| @@ -268,9 +268,9 @@ input arguments. It follows the mapping rules: | |||
| 268 | Example: | 268 | Example: |
| 269 | 269 | ||
| 270 | \(dbus-call-method | 270 | \(dbus-call-method |
| 271 | :session \"org.gnome.seahorse\" \"/org/gnome/seahorse/keys/openpgp\" | 271 | :session \"org.gnome.seahorse\" \"/org/gnome/seahorse/keys/openpgp\" |
| 272 | \"org.gnome.seahorse.Keys\" \"GetKeyField\" | 272 | \"org.gnome.seahorse.Keys\" \"GetKeyField\" |
| 273 | \"openpgp:657984B8C7A966DD\" \"simple-name\") | 273 | \"openpgp:657984B8C7A966DD\" \"simple-name\") |
| 274 | 274 | ||
| 275 | => (t (\"Philip R. Zimmermann\")) | 275 | => (t (\"Philip R. Zimmermann\")) |
| 276 | 276 | ||
| @@ -278,9 +278,9 @@ If the result of the METHOD call is just one value, the converted Lisp | |||
| 278 | object is returned instead of a list containing this single Lisp object. | 278 | object is returned instead of a list containing this single Lisp object. |
| 279 | 279 | ||
| 280 | \(dbus-call-method | 280 | \(dbus-call-method |
| 281 | :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" | 281 | :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" |
| 282 | \"org.freedesktop.Hal.Device\" \"GetPropertyString\" | 282 | \"org.freedesktop.Hal.Device\" \"GetPropertyString\" |
| 283 | \"system.kernel.machine\") | 283 | \"system.kernel.machine\") |
| 284 | 284 | ||
| 285 | => \"i686\"" | 285 | => \"i686\"" |
| 286 | 286 | ||
| @@ -357,10 +357,10 @@ HANDLER is a Lisp function, which is called when the corresponding | |||
| 357 | return message has arrived. If HANDLER is nil, no return message | 357 | return message has arrived. If HANDLER is nil, no return message |
| 358 | will be expected. | 358 | will be expected. |
| 359 | 359 | ||
| 360 | If the parameter `:timeout' is given, the following integer TIMEOUT | 360 | If the parameter `:timeout' is given, the following integer |
| 361 | specifies the maximum number of milliseconds the method call must | 361 | TIMEOUT specifies the maximum number of milliseconds before the |
| 362 | return. The default value is 25,000. If the method call doesn't | 362 | method call must return. The default value is 25,000. If the |
| 363 | return in time, a D-Bus error is raised. | 363 | method call doesn't return in time, a D-Bus error is raised. |
| 364 | 364 | ||
| 365 | All other arguments ARGS are passed to METHOD as arguments. They are | 365 | All other arguments ARGS are passed to METHOD as arguments. They are |
| 366 | converted into D-Bus types via the following rules: | 366 | converted into D-Bus types via the following rules: |
| @@ -377,19 +377,19 @@ type symbols, see Info node `(dbus)Type Conversion'. | |||
| 377 | 377 | ||
| 378 | If HANDLER is a Lisp function, the function returns a key into the | 378 | If HANDLER is a Lisp function, the function returns a key into the |
| 379 | hash table `dbus-registered-objects-table'. The corresponding entry | 379 | hash table `dbus-registered-objects-table'. The corresponding entry |
| 380 | in the hash table is removed, when the return message has been arrived, | 380 | in the hash table is removed, when the return message arrives, |
| 381 | and HANDLER is called. | 381 | and HANDLER is called. |
| 382 | 382 | ||
| 383 | Example: | 383 | Example: |
| 384 | 384 | ||
| 385 | \(dbus-call-method-asynchronously | 385 | \(dbus-call-method-asynchronously |
| 386 | :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" | 386 | :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" |
| 387 | \"org.freedesktop.Hal.Device\" \"GetPropertyString\" \\='message | 387 | \"org.freedesktop.Hal.Device\" \"GetPropertyString\" \\='message |
| 388 | \"system.kernel.machine\") | 388 | \"system.kernel.machine\") |
| 389 | 389 | ||
| 390 | => (:serial :system 2) | 390 | -| i686 |
| 391 | 391 | ||
| 392 | -| i686" | 392 | => (:serial :system 2)" |
| 393 | 393 | ||
| 394 | (or (featurep 'dbusbind) | 394 | (or (featurep 'dbusbind) |
| 395 | (signal 'dbus-error (list "Emacs not compiled with dbus support"))) | 395 | (signal 'dbus-error (list "Emacs not compiled with dbus support"))) |
| @@ -438,8 +438,8 @@ type symbols, see Info node `(dbus)Type Conversion'. | |||
| 438 | Example: | 438 | Example: |
| 439 | 439 | ||
| 440 | \(dbus-send-signal | 440 | \(dbus-send-signal |
| 441 | :session nil \"/org/gnu/Emacs\" \"org.gnu.Emacs.FileManager\" | 441 | :session nil \"/org/gnu/Emacs\" \"org.gnu.Emacs.FileManager\" |
| 442 | \"FileModified\" \"/home/albinus/.emacs\")" | 442 | \"FileModified\" \"/home/albinus/.emacs\")" |
| 443 | 443 | ||
| 444 | (or (featurep 'dbusbind) | 444 | (or (featurep 'dbusbind) |
| 445 | (signal 'dbus-error (list "Emacs not compiled with dbus support"))) | 445 | (signal 'dbus-error (list "Emacs not compiled with dbus support"))) |
| @@ -625,17 +625,17 @@ SERVICE is the D-Bus service name used by the sending D-Bus object. | |||
| 625 | It can be either a known name or the unique name of the D-Bus object | 625 | It can be either a known name or the unique name of the D-Bus object |
| 626 | sending the signal. | 626 | sending the signal. |
| 627 | 627 | ||
| 628 | PATH is the D-Bus object path SERVICE is registered. INTERFACE | 628 | PATH is the D-Bus object path SERVICE is registered at. |
| 629 | is an interface offered by SERVICE. It must provide SIGNAL. | 629 | INTERFACE is an interface offered by SERVICE. It must provide |
| 630 | HANDLER is a Lisp function to be called when the signal is | 630 | SIGNAL. HANDLER is a Lisp function to be called when the signal |
| 631 | received. It must accept as arguments the values SIGNAL is | 631 | is received. It must accept as arguments the values SIGNAL is |
| 632 | sending. | 632 | sending. |
| 633 | 633 | ||
| 634 | SERVICE, PATH, INTERFACE and SIGNAL can be nil. This is | 634 | SERVICE, PATH, INTERFACE and SIGNAL can be nil. This is |
| 635 | interpreted as a wildcard for the respective argument. | 635 | interpreted as a wildcard for the respective argument. |
| 636 | 636 | ||
| 637 | The remaining arguments ARGS can be keywords or keyword string pairs. | 637 | The remaining arguments ARGS can be keywords or keyword string pairs. |
| 638 | The meaning is as follows: | 638 | Their meaning is as follows: |
| 639 | 639 | ||
| 640 | `:argN' STRING: | 640 | `:argN' STRING: |
| 641 | `:pathN' STRING: This stands for the Nth argument of the | 641 | `:pathN' STRING: This stands for the Nth argument of the |
| @@ -643,8 +643,9 @@ signal. `:pathN' arguments can be used for object path wildcard | |||
| 643 | matches as specified by D-Bus, while an `:argN' argument | 643 | matches as specified by D-Bus, while an `:argN' argument |
| 644 | requires an exact match. | 644 | requires an exact match. |
| 645 | 645 | ||
| 646 | `:arg-namespace' STRING: Register for the signals, which first | 646 | `:arg-namespace' STRING: Register for those signals, whose first |
| 647 | argument defines the service or interface namespace STRING. | 647 | argument names a service or interface within the namespace |
| 648 | STRING. | ||
| 648 | 649 | ||
| 649 | `:path-namespace' STRING: Register for the object path namespace | 650 | `:path-namespace' STRING: Register for the object path namespace |
| 650 | STRING. All signals sent from an object path, which has STRING as | 651 | STRING. All signals sent from an object path, which has STRING as |
| @@ -660,8 +661,8 @@ Example: | |||
| 660 | (message \"Device %s added\" device)) | 661 | (message \"Device %s added\" device)) |
| 661 | 662 | ||
| 662 | \(dbus-register-signal | 663 | \(dbus-register-signal |
| 663 | :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" | 664 | :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" |
| 664 | \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" \\='my-signal-handler) | 665 | \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" \\='my-signal-handler) |
| 665 | 666 | ||
| 666 | => ((:signal :system \"org.freedesktop.Hal.Manager\" \"DeviceAdded\") | 667 | => ((:signal :system \"org.freedesktop.Hal.Manager\" \"DeviceAdded\") |
| 667 | (\"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" my-signal-handler)) | 668 | (\"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" my-signal-handler)) |
| @@ -773,24 +774,24 @@ Example: | |||
| 773 | 774 | ||
| 774 | (defun dbus-register-method | 775 | (defun dbus-register-method |
| 775 | (bus service path interface method handler &optional dont-register-service) | 776 | (bus service path interface method handler &optional dont-register-service) |
| 776 | "Register for method METHOD on the D-Bus BUS. | 777 | "Register METHOD on the D-Bus BUS. |
| 777 | 778 | ||
| 778 | BUS is either a Lisp symbol, `:system' or `:session', or a string | 779 | BUS is either a Lisp symbol, `:system' or `:session', or a string |
| 779 | denoting the bus address. | 780 | denoting the bus address. |
| 780 | 781 | ||
| 781 | SERVICE is the D-Bus service name of the D-Bus object METHOD is | 782 | SERVICE is the D-Bus service name of the D-Bus object METHOD is |
| 782 | registered for. It must be a known name (See discussion of | 783 | registered for. It must be a known name (see discussion of |
| 783 | DONT-REGISTER-SERVICE below). | 784 | DONT-REGISTER-SERVICE below). |
| 784 | 785 | ||
| 785 | PATH is the D-Bus object path SERVICE is registered (See discussion of | 786 | PATH is the D-Bus object path SERVICE is registered at (see |
| 786 | DONT-REGISTER-SERVICE below). INTERFACE is the interface offered by | 787 | discussion of DONT-REGISTER-SERVICE below). INTERFACE is the |
| 787 | SERVICE. It must provide METHOD. | 788 | interface offered by SERVICE. It must provide METHOD. |
| 788 | 789 | ||
| 789 | HANDLER is a Lisp function to be called when a method call is | 790 | HANDLER is a Lisp function to be called when a method call is |
| 790 | received. It must accept the input arguments of METHOD. The return | 791 | received. It must accept the input arguments of METHOD. The return |
| 791 | value of HANDLER is used for composing the returning D-Bus message. | 792 | value of HANDLER is used for composing the returning D-Bus message. |
| 792 | In case HANDLER shall return a reply message with an empty argument | 793 | If HANDLER returns a reply message with an empty argument list, |
| 793 | list, HANDLER must return the symbol `:ignore'. | 794 | HANDLER must return the symbol `:ignore'. |
| 794 | 795 | ||
| 795 | When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not | 796 | When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not |
| 796 | registered. This means that other D-Bus clients have no way of | 797 | registered. This means that other D-Bus clients have no way of |
| @@ -888,8 +889,8 @@ association to the service from D-Bus." | |||
| 888 | ;;; D-Bus type conversion. | 889 | ;;; D-Bus type conversion. |
| 889 | 890 | ||
| 890 | (defun dbus-string-to-byte-array (string) | 891 | (defun dbus-string-to-byte-array (string) |
| 891 | "Transform STRING to list (:array :byte c1 :byte c2 ...). | 892 | "Transform STRING to list (:array :byte C1 :byte C2 ...). |
| 892 | STRING shall be UTF8 coded." | 893 | STRING shall be UTF-8 coded." |
| 893 | (if (zerop (length string)) | 894 | (if (zerop (length string)) |
| 894 | '(:array :signature "y") | 895 | '(:array :signature "y") |
| 895 | (let (result) | 896 | (let (result) |
| @@ -897,7 +898,7 @@ STRING shall be UTF8 coded." | |||
| 897 | (setq result (append result (list :byte elt))))))) | 898 | (setq result (append result (list :byte elt))))))) |
| 898 | 899 | ||
| 899 | (defun dbus-byte-array-to-string (byte-array &optional multibyte) | 900 | (defun dbus-byte-array-to-string (byte-array &optional multibyte) |
| 900 | "Transform BYTE-ARRAY into UTF8 coded string. | 901 | "Transform BYTE-ARRAY into UTF-8 coded string. |
| 901 | BYTE-ARRAY must be a list of structure (c1 c2 ...), or a byte | 902 | BYTE-ARRAY must be a list of structure (c1 c2 ...), or a byte |
| 902 | array as produced by `dbus-string-to-byte-array'. The resulting | 903 | array as produced by `dbus-string-to-byte-array'. The resulting |
| 903 | string is unibyte encoded, unless MULTIBYTE is non-nil." | 904 | string is unibyte encoded, unless MULTIBYTE is non-nil." |
| @@ -920,9 +921,9 @@ lower-case hex digits: | |||
| 920 | 921 | ||
| 921 | \"0123abc_xyz\\x01\\xff\" -> \"_30123abc_5fxyz_01_ff\" | 922 | \"0123abc_xyz\\x01\\xff\" -> \"_30123abc_5fxyz_01_ff\" |
| 922 | 923 | ||
| 923 | i.e. similar to URI encoding, but with \"_\" taking the role of \"%\", | 924 | i.e. similar to URI encoding, but with \"_\" taking the role of |
| 924 | and a smaller allowed set. As a special case, \"\" is escaped to | 925 | \"%\", and a smaller allowed set. As a special case, \"\" is |
| 925 | \"_\". | 926 | escaped to \"_\". |
| 926 | 927 | ||
| 927 | Returns the escaped string. Algorithm taken from | 928 | Returns the escaped string. Algorithm taken from |
| 928 | telepathy-glib's `tp_escape_as_identifier'." | 929 | telepathy-glib's `tp_escape_as_identifier'." |
| @@ -963,8 +964,8 @@ the function which has been registered for this message. ARGS | |||
| 963 | are the arguments passed to HANDLER, when it is called during | 964 | are the arguments passed to HANDLER, when it is called during |
| 964 | event handling in `dbus-handle-event'. | 965 | event handling in `dbus-handle-event'. |
| 965 | 966 | ||
| 966 | This function raises a `dbus-error' signal in case the event is | 967 | This function signals a `dbus-error' if the event is not well |
| 967 | not well formed." | 968 | formed." |
| 968 | (when dbus-debug (message "DBus-Event %s" event)) | 969 | (when dbus-debug (message "DBus-Event %s" event)) |
| 969 | (unless (and (listp event) | 970 | (unless (and (listp event) |
| 970 | (eq (car event) 'dbus-event) | 971 | (eq (car event) 'dbus-event) |
| @@ -1038,16 +1039,16 @@ If the HANDLER returns a `dbus-error', it is propagated as return message." | |||
| 1038 | "Return the bus name the event is coming from. | 1039 | "Return the bus name the event is coming from. |
| 1039 | The result is either a Lisp symbol, `:system' or `:session', or a | 1040 | The result is either a Lisp symbol, `:system' or `:session', or a |
| 1040 | string denoting the bus address. EVENT is a D-Bus event, see | 1041 | string denoting the bus address. EVENT is a D-Bus event, see |
| 1041 | `dbus-check-event'. This function raises a `dbus-error' signal | 1042 | `dbus-check-event'. This function signals a `dbus-error' if the |
| 1042 | in case the event is not well formed." | 1043 | event is not well formed." |
| 1043 | (dbus-check-event event) | 1044 | (dbus-check-event event) |
| 1044 | (nth 1 event)) | 1045 | (nth 1 event)) |
| 1045 | 1046 | ||
| 1046 | (defun dbus-event-message-type (event) | 1047 | (defun dbus-event-message-type (event) |
| 1047 | "Return the message type of the corresponding D-Bus message. | 1048 | "Return the message type of the corresponding D-Bus message. |
| 1048 | The result is a number. EVENT is a D-Bus event, see | 1049 | The result is a number. EVENT is a D-Bus event, see |
| 1049 | `dbus-check-event'. This function raises a `dbus-error' signal | 1050 | `dbus-check-event'. This function signals a `dbus-error' if the |
| 1050 | in case the event is not well formed." | 1051 | event is not well formed." |
| 1051 | (dbus-check-event event) | 1052 | (dbus-check-event event) |
| 1052 | (nth 2 event)) | 1053 | (nth 2 event)) |
| 1053 | 1054 | ||
| @@ -1055,41 +1056,40 @@ in case the event is not well formed." | |||
| 1055 | "Return the serial number of the corresponding D-Bus message. | 1056 | "Return the serial number of the corresponding D-Bus message. |
| 1056 | The result is a number. The serial number is needed for | 1057 | The result is a number. The serial number is needed for |
| 1057 | generating a reply message. EVENT is a D-Bus event, see | 1058 | generating a reply message. EVENT is a D-Bus event, see |
| 1058 | `dbus-check-event'. This function raises a `dbus-error' signal | 1059 | `dbus-check-event'. This function signals a `dbus-error' if the |
| 1059 | in case the event is not well formed." | 1060 | event is not well formed." |
| 1060 | (dbus-check-event event) | 1061 | (dbus-check-event event) |
| 1061 | (nth 3 event)) | 1062 | (nth 3 event)) |
| 1062 | 1063 | ||
| 1063 | (defun dbus-event-service-name (event) | 1064 | (defun dbus-event-service-name (event) |
| 1064 | "Return the name of the D-Bus object the event is coming from. | 1065 | "Return the name of the D-Bus object the event is coming from. |
| 1065 | The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. | 1066 | The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. |
| 1066 | This function raises a `dbus-error' signal in case the event is | 1067 | This function signals a `dbus-error' if the event is not well |
| 1067 | not well formed." | 1068 | formed." |
| 1068 | (dbus-check-event event) | 1069 | (dbus-check-event event) |
| 1069 | (nth 4 event)) | 1070 | (nth 4 event)) |
| 1070 | 1071 | ||
| 1071 | (defun dbus-event-path-name (event) | 1072 | (defun dbus-event-path-name (event) |
| 1072 | "Return the object path of the D-Bus object the event is coming from. | 1073 | "Return the object path of the D-Bus object the event is coming from. |
| 1073 | The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. | 1074 | The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. |
| 1074 | This function raises a `dbus-error' signal in case the event is | 1075 | This function signals a `dbus-error' if the event is not well |
| 1075 | not well formed." | 1076 | formed." |
| 1076 | (dbus-check-event event) | 1077 | (dbus-check-event event) |
| 1077 | (nth 5 event)) | 1078 | (nth 5 event)) |
| 1078 | 1079 | ||
| 1079 | (defun dbus-event-interface-name (event) | 1080 | (defun dbus-event-interface-name (event) |
| 1080 | "Return the interface name of the D-Bus object the event is coming from. | 1081 | "Return the interface name of the D-Bus object the event is coming from. |
| 1081 | The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. | 1082 | The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. |
| 1082 | This function raises a `dbus-error' signal in case the event is | 1083 | This function signals a `dbus-error' if the event is not well |
| 1083 | not well formed." | 1084 | formed." |
| 1084 | (dbus-check-event event) | 1085 | (dbus-check-event event) |
| 1085 | (nth 6 event)) | 1086 | (nth 6 event)) |
| 1086 | 1087 | ||
| 1087 | (defun dbus-event-member-name (event) | 1088 | (defun dbus-event-member-name (event) |
| 1088 | "Return the member name the event is coming from. | 1089 | "Return the member name the event is coming from. |
| 1089 | It is either a signal name or a method name. The result is a | 1090 | It is either a signal name or a method name. The result is a |
| 1090 | string. EVENT is a D-Bus event, see `dbus-check-event'. This | 1091 | string. EVENT is a D-Bus event, see `dbus-check-event'. This |
| 1091 | function raises a `dbus-error' signal in case the event is not | 1092 | function signals a `dbus-error' if the event is not well formed." |
| 1092 | well formed." | ||
| 1093 | (dbus-check-event event) | 1093 | (dbus-check-event event) |
| 1094 | (nth 7 event)) | 1094 | (nth 7 event)) |
| 1095 | 1095 | ||
| @@ -1097,10 +1097,10 @@ well formed." | |||
| 1097 | ;;; D-Bus registered names. | 1097 | ;;; D-Bus registered names. |
| 1098 | 1098 | ||
| 1099 | (defun dbus-list-activatable-names (&optional bus) | 1099 | (defun dbus-list-activatable-names (&optional bus) |
| 1100 | "Return the D-Bus service names which can be activated as list. | 1100 | "Return a list of the D-Bus service names which can be activated. |
| 1101 | If BUS is left nil, `:system' is assumed. The result is a list | 1101 | BUS defaults to `:system' when nil or omitted. The result is a |
| 1102 | of strings, which is nil when there are no activatable service | 1102 | list of strings, which is nil when there are no activatable |
| 1103 | names at all." | 1103 | service names at all." |
| 1104 | (dbus-ignore-errors | 1104 | (dbus-ignore-errors |
| 1105 | (dbus-call-method | 1105 | (dbus-call-method |
| 1106 | (or bus :system) dbus-service-dbus | 1106 | (or bus :system) dbus-service-dbus |
| @@ -1126,8 +1126,8 @@ A service has a known name if it doesn't start with \":\"." | |||
| 1126 | 1126 | ||
| 1127 | (defun dbus-list-queued-owners (bus service) | 1127 | (defun dbus-list-queued-owners (bus service) |
| 1128 | "Return the unique names registered at D-Bus BUS and queued for SERVICE. | 1128 | "Return the unique names registered at D-Bus BUS and queued for SERVICE. |
| 1129 | The result is a list of strings, or nil when there are no | 1129 | The result is a list of strings, or nil when there are no queued |
| 1130 | queued name owners service names at all." | 1130 | name owner service names at all." |
| 1131 | (dbus-ignore-errors | 1131 | (dbus-ignore-errors |
| 1132 | (dbus-call-method | 1132 | (dbus-call-method |
| 1133 | bus dbus-service-dbus dbus-path-dbus | 1133 | bus dbus-service-dbus dbus-path-dbus |
| @@ -1144,13 +1144,13 @@ The result is either a string, or nil if there is no name owner." | |||
| 1144 | (defun dbus-ping (bus service &optional timeout) | 1144 | (defun dbus-ping (bus service &optional timeout) |
| 1145 | "Check whether SERVICE is registered for D-Bus BUS. | 1145 | "Check whether SERVICE is registered for D-Bus BUS. |
| 1146 | TIMEOUT, a nonnegative integer, specifies the maximum number of | 1146 | TIMEOUT, a nonnegative integer, specifies the maximum number of |
| 1147 | milliseconds `dbus-ping' must return. The default value is 25,000. | 1147 | milliseconds before `dbus-ping' must return. The default value |
| 1148 | is 25,000. | ||
| 1148 | 1149 | ||
| 1149 | Note, that this autoloads SERVICE if it is not running yet. If | 1150 | Note, that this autoloads SERVICE if it is not running yet. To |
| 1150 | it shall be checked whether SERVICE is already running, one shall | 1151 | check whether SERVICE is already running, you can instead write |
| 1151 | apply | ||
| 1152 | 1152 | ||
| 1153 | (member service \(dbus-list-known-names bus))" | 1153 | (member service (dbus-list-known-names bus))" |
| 1154 | ;; "Ping" raises a D-Bus error if SERVICE does not exist. | 1154 | ;; "Ping" raises a D-Bus error if SERVICE does not exist. |
| 1155 | ;; Otherwise, it returns silently with nil. | 1155 | ;; Otherwise, it returns silently with nil. |
| 1156 | (condition-case nil | 1156 | (condition-case nil |
| @@ -1239,11 +1239,11 @@ It returns a list of strings, which are further object paths of SERVICE." | |||
| 1239 | "Return all interface names of SERVICE in D-Bus BUS at object path PATH. | 1239 | "Return all interface names of SERVICE in D-Bus BUS at object path PATH. |
| 1240 | It returns a list of strings. | 1240 | It returns a list of strings. |
| 1241 | 1241 | ||
| 1242 | There will be always the default interface | 1242 | The default interface \"org.freedesktop.DBus.Introspectable\" is |
| 1243 | \"org.freedesktop.DBus.Introspectable\". Another default | 1243 | always present. Another default interface is |
| 1244 | interface is \"org.freedesktop.DBus.Properties\". If present, | 1244 | \"org.freedesktop.DBus.Properties\". If present, \"interface\" |
| 1245 | \"interface\" objects can also have \"property\" objects as | 1245 | objects can also have \"property\" objects as children, beside |
| 1246 | children, beside \"method\" and \"signal\" objects." | 1246 | \"method\" and \"signal\" objects." |
| 1247 | (let ((object (dbus-introspect-xml bus service path)) | 1247 | (let ((object (dbus-introspect-xml bus service path)) |
| 1248 | result) | 1248 | result) |
| 1249 | (dolist (elt (xml-get-children object 'interface) (nreverse result)) | 1249 | (dolist (elt (xml-get-children object 'interface) (nreverse result)) |
| @@ -1251,9 +1251,10 @@ children, beside \"method\" and \"signal\" objects." | |||
| 1251 | 1251 | ||
| 1252 | (defun dbus-introspect-get-interface (bus service path interface) | 1252 | (defun dbus-introspect-get-interface (bus service path interface) |
| 1253 | "Return the INTERFACE of SERVICE in D-Bus BUS at object path PATH. | 1253 | "Return the INTERFACE of SERVICE in D-Bus BUS at object path PATH. |
| 1254 | The return value is an XML object. INTERFACE must be a string, | 1254 | The return value is an XML object. INTERFACE must be a string |
| 1255 | element of the list returned by `dbus-introspect-get-interface-names'. | 1255 | and a member of the list returned by |
| 1256 | The resulting \"interface\" object can contain \"method\", \"signal\", | 1256 | `dbus-introspect-get-interface-names'. The resulting |
| 1257 | \"interface\" object can contain \"method\", \"signal\", | ||
| 1257 | \"property\" and \"annotation\" children." | 1258 | \"property\" and \"annotation\" children." |
| 1258 | (let ((elt (xml-get-children | 1259 | (let ((elt (xml-get-children |
| 1259 | (dbus-introspect-xml bus service path) 'interface))) | 1260 | (dbus-introspect-xml bus service path) 'interface))) |
| @@ -1273,9 +1274,9 @@ SERVICE is a service of D-Bus BUS at object path PATH." | |||
| 1273 | (push (dbus-introspect-get-attribute elt "name") result)))) | 1274 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1274 | 1275 | ||
| 1275 | (defun dbus-introspect-get-method (bus service path interface method) | 1276 | (defun dbus-introspect-get-method (bus service path interface method) |
| 1276 | "Return method METHOD of interface INTERFACE as XML object. | 1277 | "Return method METHOD of interface INTERFACE as an XML object. |
| 1277 | It must be located at SERVICE in D-Bus BUS at object path PATH. | 1278 | It must be located at SERVICE in D-Bus BUS at object path PATH. |
| 1278 | METHOD must be a string, element of the list returned by | 1279 | METHOD must be a string and a member of the list returned by |
| 1279 | `dbus-introspect-get-method-names'. The resulting \"method\" | 1280 | `dbus-introspect-get-method-names'. The resulting \"method\" |
| 1280 | object can contain \"arg\" and \"annotation\" children." | 1281 | object can contain \"arg\" and \"annotation\" children." |
| 1281 | (let ((elt (xml-get-children | 1282 | (let ((elt (xml-get-children |
| @@ -1296,7 +1297,7 @@ SERVICE is a service of D-Bus BUS at object path PATH." | |||
| 1296 | (push (dbus-introspect-get-attribute elt "name") result)))) | 1297 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1297 | 1298 | ||
| 1298 | (defun dbus-introspect-get-signal (bus service path interface signal) | 1299 | (defun dbus-introspect-get-signal (bus service path interface signal) |
| 1299 | "Return signal SIGNAL of interface INTERFACE as XML object. | 1300 | "Return signal SIGNAL of interface INTERFACE as an XML object. |
| 1300 | It must be located at SERVICE in D-Bus BUS at object path PATH. | 1301 | It must be located at SERVICE in D-Bus BUS at object path PATH. |
| 1301 | SIGNAL must be a string, element of the list returned by | 1302 | SIGNAL must be a string, element of the list returned by |
| 1302 | `dbus-introspect-get-signal-names'. The resulting \"signal\" | 1303 | `dbus-introspect-get-signal-names'. The resulting \"signal\" |
| @@ -1319,9 +1320,9 @@ SERVICE is a service of D-Bus BUS at object path PATH." | |||
| 1319 | (push (dbus-introspect-get-attribute elt "name") result)))) | 1320 | (push (dbus-introspect-get-attribute elt "name") result)))) |
| 1320 | 1321 | ||
| 1321 | (defun dbus-introspect-get-property (bus service path interface property) | 1322 | (defun dbus-introspect-get-property (bus service path interface property) |
| 1322 | "Return PROPERTY of INTERFACE as XML object. | 1323 | "Return PROPERTY of INTERFACE as an XML object. |
| 1323 | It must be located at SERVICE in D-Bus BUS at object path PATH. | 1324 | It must be located at SERVICE in D-Bus BUS at object path PATH. |
| 1324 | PROPERTY must be a string, element of the list returned by | 1325 | PROPERTY must be a string and a member of the list returned by |
| 1325 | `dbus-introspect-get-property-names'. The resulting PROPERTY | 1326 | `dbus-introspect-get-property-names'. The resulting PROPERTY |
| 1326 | object can contain \"annotation\" children." | 1327 | object can contain \"annotation\" children." |
| 1327 | (let ((elt (xml-get-children | 1328 | (let ((elt (xml-get-children |
| @@ -1336,7 +1337,7 @@ object can contain \"annotation\" children." | |||
| 1336 | 1337 | ||
| 1337 | (defun dbus-introspect-get-annotation-names | 1338 | (defun dbus-introspect-get-annotation-names |
| 1338 | (bus service path interface &optional name) | 1339 | (bus service path interface &optional name) |
| 1339 | "Return all annotation names as list of strings. | 1340 | "Return all annotation names as a list of strings. |
| 1340 | If NAME is nil, the annotations are children of INTERFACE, | 1341 | If NAME is nil, the annotations are children of INTERFACE, |
| 1341 | otherwise NAME must be a \"method\", \"signal\", or \"property\" | 1342 | otherwise NAME must be a \"method\", \"signal\", or \"property\" |
| 1342 | object, where the annotations belong to." | 1343 | object, where the annotations belong to." |
| @@ -1352,7 +1353,7 @@ object, where the annotations belong to." | |||
| 1352 | 1353 | ||
| 1353 | (defun dbus-introspect-get-annotation | 1354 | (defun dbus-introspect-get-annotation |
| 1354 | (bus service path interface name annotation) | 1355 | (bus service path interface name annotation) |
| 1355 | "Return ANNOTATION as XML object. | 1356 | "Return ANNOTATION as an XML object. |
| 1356 | If NAME is nil, ANNOTATION is a child of INTERFACE, otherwise | 1357 | If NAME is nil, ANNOTATION is a child of INTERFACE, otherwise |
| 1357 | NAME must be the name of a \"method\", \"signal\", or | 1358 | NAME must be the name of a \"method\", \"signal\", or |
| 1358 | \"property\" object, where the ANNOTATION belongs to." | 1359 | \"property\" object, where the ANNOTATION belongs to." |
| @@ -1374,7 +1375,7 @@ NAME must be the name of a \"method\", \"signal\", or | |||
| 1374 | (car elt))) | 1375 | (car elt))) |
| 1375 | 1376 | ||
| 1376 | (defun dbus-introspect-get-argument-names (bus service path interface name) | 1377 | (defun dbus-introspect-get-argument-names (bus service path interface name) |
| 1377 | "Return a list of all argument names as list of strings. | 1378 | "Return a list of all argument names as a list of strings. |
| 1378 | NAME must be a \"method\" or \"signal\" object. | 1379 | NAME must be a \"method\" or \"signal\" object. |
| 1379 | 1380 | ||
| 1380 | Argument names are optional, the function can return nil | 1381 | Argument names are optional, the function can return nil |
| @@ -1388,8 +1389,9 @@ therefore, even if the method or signal has arguments." | |||
| 1388 | 1389 | ||
| 1389 | (defun dbus-introspect-get-argument (bus service path interface name arg) | 1390 | (defun dbus-introspect-get-argument (bus service path interface name arg) |
| 1390 | "Return argument ARG as XML object. | 1391 | "Return argument ARG as XML object. |
| 1391 | NAME must be a \"method\" or \"signal\" object. ARG must be a string, | 1392 | NAME must be a \"method\" or \"signal\" object. ARG must be a |
| 1392 | element of the list returned by `dbus-introspect-get-argument-names'." | 1393 | string and a member of the list returned by |
| 1394 | `dbus-introspect-get-argument-names'." | ||
| 1393 | (let ((elt (xml-get-children | 1395 | (let ((elt (xml-get-children |
| 1394 | (or (dbus-introspect-get-method bus service path interface name) | 1396 | (or (dbus-introspect-get-method bus service path interface name) |
| 1395 | (dbus-introspect-get-signal bus service path interface name)) | 1397 | (dbus-introspect-get-signal bus service path interface name)) |
| @@ -1402,7 +1404,7 @@ element of the list returned by `dbus-introspect-get-argument-names'." | |||
| 1402 | 1404 | ||
| 1403 | (defun dbus-introspect-get-signature | 1405 | (defun dbus-introspect-get-signature |
| 1404 | (bus service path interface name &optional direction) | 1406 | (bus service path interface name &optional direction) |
| 1405 | "Return signature of a `method' or `signal', represented by NAME, as string. | 1407 | "Return signature of a `method' or `signal' represented by NAME as a string. |
| 1406 | If NAME is a `method', DIRECTION can be either \"in\" or \"out\". | 1408 | If NAME is a `method', DIRECTION can be either \"in\" or \"out\". |
| 1407 | If DIRECTION is nil, \"in\" is assumed. | 1409 | If DIRECTION is nil, \"in\" is assumed. |
| 1408 | 1410 | ||
| @@ -1450,9 +1452,8 @@ valid D-Bus value, or nil if there is no PROPERTY." | |||
| 1450 | 1452 | ||
| 1451 | (defun dbus-set-property (bus service path interface property value) | 1453 | (defun dbus-set-property (bus service path interface property value) |
| 1452 | "Set value of PROPERTY of INTERFACE to VALUE. | 1454 | "Set value of PROPERTY of INTERFACE to VALUE. |
| 1453 | It will be checked at BUS, SERVICE, PATH. When the value has | 1455 | It will be checked at BUS, SERVICE, PATH. When the value is |
| 1454 | been set successful, the result is VALUE. Otherwise, nil is | 1456 | successfully set return VALUE. Otherwise, return nil." |
| 1455 | returned." | ||
| 1456 | (dbus-ignore-errors | 1457 | (dbus-ignore-errors |
| 1457 | ;; "Set" requires a variant. | 1458 | ;; "Set" requires a variant. |
| 1458 | (dbus-call-method | 1459 | (dbus-call-method |
| @@ -1479,15 +1480,15 @@ nil is returned." | |||
| 1479 | (defun dbus-register-property | 1480 | (defun dbus-register-property |
| 1480 | (bus service path interface property access value | 1481 | (bus service path interface property access value |
| 1481 | &optional emits-signal dont-register-service) | 1482 | &optional emits-signal dont-register-service) |
| 1482 | "Register property PROPERTY on the D-Bus BUS. | 1483 | "Register PROPERTY on the D-Bus BUS. |
| 1483 | 1484 | ||
| 1484 | BUS is either a Lisp symbol, `:system' or `:session', or a string | 1485 | BUS is either a Lisp symbol, `:system' or `:session', or a string |
| 1485 | denoting the bus address. | 1486 | denoting the bus address. |
| 1486 | 1487 | ||
| 1487 | SERVICE is the D-Bus service name of the D-Bus. It must be a | 1488 | SERVICE is the D-Bus service name of the D-Bus. It must be a |
| 1488 | known name (See discussion of DONT-REGISTER-SERVICE below). | 1489 | known name (see discussion of DONT-REGISTER-SERVICE below). |
| 1489 | 1490 | ||
| 1490 | PATH is the D-Bus object path SERVICE is registered (See | 1491 | PATH is the D-Bus object path SERVICE is registered at (see |
| 1491 | discussion of DONT-REGISTER-SERVICE below). INTERFACE is the | 1492 | discussion of DONT-REGISTER-SERVICE below). INTERFACE is the |
| 1492 | name of the interface used at PATH, PROPERTY is the name of the | 1493 | name of the interface used at PATH, PROPERTY is the name of the |
| 1493 | property of INTERFACE. ACCESS indicates, whether the property | 1494 | property of INTERFACE. ACCESS indicates, whether the property |
| @@ -1625,8 +1626,8 @@ It will be registered for all objects created by `dbus-register-property'." | |||
| 1625 | "Return all objects at BUS, SERVICE, PATH, and the children of PATH. | 1626 | "Return all objects at BUS, SERVICE, PATH, and the children of PATH. |
| 1626 | The result is a list of objects. Every object is a cons of an | 1627 | The result is a list of objects. Every object is a cons of an |
| 1627 | existing path name, and the list of available interface objects. | 1628 | existing path name, and the list of available interface objects. |
| 1628 | An interface object is another cons, which car is the interface | 1629 | An interface object is another cons, whose car is the interface |
| 1629 | name, and the cdr is the list of properties as returned by | 1630 | name and cdr is the list of properties as returned by |
| 1630 | `dbus-get-all-properties' for that path and interface. Example: | 1631 | `dbus-get-all-properties' for that path and interface. Example: |
| 1631 | 1632 | ||
| 1632 | \(dbus-get-all-managed-objects :session \"org.gnome.SettingsDaemon\" \"/\") | 1633 | \(dbus-get-all-managed-objects :session \"org.gnome.SettingsDaemon\" \"/\") |
| @@ -1782,12 +1783,13 @@ can be a string denoting the address of the corresponding bus. For | |||
| 1782 | the system and session buses, this function is called when loading | 1783 | the system and session buses, this function is called when loading |
| 1783 | `dbus.el', there is no need to call it again. | 1784 | `dbus.el', there is no need to call it again. |
| 1784 | 1785 | ||
| 1785 | The function returns a number, which counts the connections this Emacs | 1786 | The function returns the number of connections this Emacs session |
| 1786 | session has established to the BUS under the same unique name (see | 1787 | has established to the BUS under the same unique name (see |
| 1787 | `dbus-get-unique-name'). It depends on the libraries Emacs is linked | 1788 | `dbus-get-unique-name'). It depends on the libraries Emacs is |
| 1788 | with, and on the environment Emacs is running. For example, if Emacs | 1789 | linked with, and on the environment Emacs is running. For |
| 1789 | is linked with the gtk toolkit, and it runs in a GTK-aware environment | 1790 | example, if Emacs is linked with the GTK+ toolkit, and it runs in |
| 1790 | like Gnome, another connection might already be established. | 1791 | a GTK+-aware environment like GNOME, another connection might |
| 1792 | already be established. | ||
| 1791 | 1793 | ||
| 1792 | When PRIVATE is non-nil, a new connection is established instead of | 1794 | When PRIVATE is non-nil, a new connection is established instead of |
| 1793 | reusing an existing one. It results in a new unique name at the bus. | 1795 | reusing an existing one. It results in a new unique name at the bus. |
diff --git a/lisp/simple.el b/lisp/simple.el index 0fe8a1025ce..a28d10fd4a5 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -212,7 +212,7 @@ all other buffers." | |||
| 212 | (const :tag "Single next-error capable buffer on selected frame" | 212 | (const :tag "Single next-error capable buffer on selected frame" |
| 213 | next-error-buffer-on-selected-frame) | 213 | next-error-buffer-on-selected-frame) |
| 214 | (const :tag "Current buffer if next-error capable and outside navigation" | 214 | (const :tag "Current buffer if next-error capable and outside navigation" |
| 215 | next-error-no-navigation-try-current) | 215 | next-error-buffer-unnavigated-current) |
| 216 | (function :tag "Other function")) | 216 | (function :tag "Other function")) |
| 217 | :group 'next-error | 217 | :group 'next-error |
| 218 | :version "28.1") | 218 | :version "28.1") |
| @@ -242,10 +242,9 @@ from which next-error navigated, and a target buffer TO-BUFFER." | |||
| 242 | (if (eq (length window-buffers) 1) | 242 | (if (eq (length window-buffers) 1) |
| 243 | (car window-buffers)))) | 243 | (car window-buffers)))) |
| 244 | 244 | ||
| 245 | (defun next-error-no-navigation-try-current (&optional | 245 | (defun next-error-buffer-unnavigated-current (&optional avoid-current |
| 246 | avoid-current | 246 | extra-test-inclusive |
| 247 | extra-test-inclusive | 247 | extra-test-exclusive) |
| 248 | extra-test-exclusive) | ||
| 249 | "Try the current buffer when outside navigation. | 248 | "Try the current buffer when outside navigation. |
| 250 | But return nil if we navigated to the current buffer by the means | 249 | But return nil if we navigated to the current buffer by the means |
| 251 | of `next-error' command. Othewise, return it if it's next-error | 250 | of `next-error' command. Othewise, return it if it's next-error |
| @@ -3951,7 +3950,12 @@ is used for ERROR-BUFFER. | |||
| 3951 | 3950 | ||
| 3952 | Optional seventh arg DISPLAY-ERROR-BUFFER, if non-nil, means to | 3951 | Optional seventh arg DISPLAY-ERROR-BUFFER, if non-nil, means to |
| 3953 | display the error buffer if there were any errors. When called | 3952 | display the error buffer if there were any errors. When called |
| 3954 | interactively, this is t." | 3953 | interactively, this is t. |
| 3954 | |||
| 3955 | Non-nil REGION-NONCONTIGUOUS-P means that the region is composed of | ||
| 3956 | noncontiguous pieces. The most common example of this is a | ||
| 3957 | rectangular region, where the pieces are separated by newline | ||
| 3958 | characters." | ||
| 3955 | (interactive (let (string) | 3959 | (interactive (let (string) |
| 3956 | (unless (mark) | 3960 | (unless (mark) |
| 3957 | (user-error "The mark is not set now, so there is no region")) | 3961 | (user-error "The mark is not set now, so there is no region")) |
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index eb3ad72db43..b54258a4e4a 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el | |||
| @@ -44,25 +44,12 @@ | |||
| 44 | :group 'convenience | 44 | :group 'convenience |
| 45 | :version "27.1") | 45 | :version "27.1") |
| 46 | 46 | ||
| 47 | (defgroup tab-bar-faces nil | 47 | (defgroup tab-bar-faces '((tab-bar custom-face)) ; tab-bar is defined in faces.el |
| 48 | "Faces used in the tab bar." | 48 | "Faces used in the tab bar." |
| 49 | :group 'tab-bar | 49 | :group 'tab-bar |
| 50 | :group 'faces | 50 | :group 'faces |
| 51 | :version "27.1") | 51 | :version "27.1") |
| 52 | 52 | ||
| 53 | (defface tab-bar | ||
| 54 | '((((class color) (min-colors 88)) | ||
| 55 | :inherit variable-pitch | ||
| 56 | :background "grey85" | ||
| 57 | :foreground "black") | ||
| 58 | (((class mono)) | ||
| 59 | :background "grey") | ||
| 60 | (t | ||
| 61 | :inverse-video t)) | ||
| 62 | "Tab bar face." | ||
| 63 | :version "27.1" | ||
| 64 | :group 'tab-bar-faces) | ||
| 65 | |||
| 66 | (defface tab-bar-tab | 53 | (defface tab-bar-tab |
| 67 | '((default | 54 | '((default |
| 68 | :inherit tab-bar) | 55 | :inherit tab-bar) |
diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 7a2bdc0b72f..e8c4dc4d93c 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el | |||
| @@ -35,26 +35,12 @@ | |||
| 35 | :group 'convenience | 35 | :group 'convenience |
| 36 | :version "27.1") | 36 | :version "27.1") |
| 37 | 37 | ||
| 38 | (defgroup tab-line-faces nil | 38 | (defgroup tab-line-faces '((tab-line custom-face)) ; tab-line is defined in faces.el |
| 39 | "Faces used in the tab line." | 39 | "Faces used in the tab line." |
| 40 | :group 'tab-line | 40 | :group 'tab-line |
| 41 | :group 'faces | 41 | :group 'faces |
| 42 | :version "27.1") | 42 | :version "27.1") |
| 43 | 43 | ||
| 44 | (defface tab-line | ||
| 45 | '((((class color) (min-colors 88)) | ||
| 46 | :inherit variable-pitch | ||
| 47 | :height 0.9 | ||
| 48 | :background "grey85" | ||
| 49 | :foreground "black") | ||
| 50 | (((class mono)) | ||
| 51 | :background "grey") | ||
| 52 | (t | ||
| 53 | :inverse-video t)) | ||
| 54 | "Tab line face." | ||
| 55 | :version "27.1" | ||
| 56 | :group 'tab-line-faces) | ||
| 57 | |||
| 58 | (defface tab-line-tab | 44 | (defface tab-line-tab |
| 59 | '((default | 45 | '((default |
| 60 | :inherit tab-line) | 46 | :inherit tab-line) |