diff options
| author | Tom Tromey <tromey@redhat.com> | 2013-07-26 14:02:53 -0600 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2013-07-26 14:02:53 -0600 |
| commit | cc231cbe45d27a1906d268fb72d3b4105a2e9c65 (patch) | |
| tree | c011828e2a3a18e77eaa8849e3cccb805d798f42 /lisp/net | |
| parent | b34a529f177a6ea32da5cb1254f91bf9d71838db (diff) | |
| parent | fec9206062b420aca84f53d05a72c3ee43244022 (diff) | |
| download | emacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.tar.gz | |
merge from trunk
Diffstat (limited to 'lisp/net')
| -rw-r--r-- | lisp/net/eww.el | 2 | ||||
| -rw-r--r-- | lisp/net/shr.el | 14 | ||||
| -rw-r--r-- | lisp/net/tramp-adb.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-compat.el | 4 | ||||
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 3 | ||||
| -rw-r--r-- | lisp/net/tramp-smb.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 17 |
8 files changed, 35 insertions, 11 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index d832aa7ef3e..d65932ae7c9 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -603,7 +603,7 @@ appears in a <link> or <a> tag." (insert " "))) (defun eww-process-text-input (beg end length) - (let* ((form (get-text-property end 'eww-form)) + (let* ((form (get-text-property (min (1+ end) (point-max)) 'eww-form)) (properties (text-properties-at end)) (type (plist-get form :type))) (when (and form diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 4506ede8722..6ddf8d2af90 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -143,6 +143,7 @@ cid: URL as the argument.") (define-key map [tab] 'shr-next-link) (define-key map [backtab] 'shr-previous-link) (define-key map [follow-link] 'mouse-face) + (define-key map [mouse-2] 'shr-mouse-browse-url) (define-key map "I" 'shr-insert-image) (define-key map "w" 'shr-copy-url) (define-key map "u" 'shr-copy-url) @@ -657,6 +658,12 @@ size, and full-buffer size." (forward-line 1) (goto-char end)))))) +(defun shr-mouse-browse-url (ev) + "Browse the URL under the mouse cursor." + (interactive "e") + (mouse-set-point ev) + (shr-browse-url)) + (defun shr-browse-url (&optional external) "Browse the URL under point. If EXTERNAL, browse the URL using `shr-external-browser'." @@ -1476,9 +1483,6 @@ ones, in case fg and bg are nil." (if column (aref widths width-column) 10)) - ;; Sanity check for degenerate tables. - (when (zerop width) - (setq width 10)) (when (and fill (setq colspan (cdr (assq :colspan (cdr column))))) (setq colspan (string-to-number colspan)) @@ -1491,6 +1495,9 @@ ones, in case fg and bg are nil." (setq width-column (+ width-column (1- colspan)))) (when (or column (not fill)) + ;; Sanity check for degenerate tables. + (when (zerop width) + (setq width 10)) (push (shr-render-td (cdr column) width fill) tds)) (setq i (1+ i) @@ -1499,6 +1506,7 @@ ones, in case fg and bg are nil." (nreverse trs))) (defun shr-render-td (cont width fill) + (when (= width 0) (debug)) (with-temp-buffer (let ((bgcolor (cdr (assq :bgcolor cont))) (fgcolor (cdr (assq :fgcolor cont))) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 14fb8575fff..82b017fa230 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -108,6 +108,8 @@ (file-writable-p . tramp-adb-handle-file-writable-p) (file-local-copy . tramp-adb-handle-file-local-copy) (file-modes . tramp-handle-file-modes) + (file-notify-add-watch . tramp-handle-file-notify-add-watch) + (file-notify-rm-watch . ignore) (expand-file-name . tramp-adb-handle-expand-file-name) (find-backup-file-name . tramp-handle-find-backup-file-name) (directory-files . tramp-handle-directory-files) diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index d4115352b34..2b0ea74c492 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -184,7 +184,7 @@ 'file-expand-wildcards 'around 'tramp-advice-file-expand-wildcards) (ad-activate 'file-expand-wildcards))))) -;; `with-temp-message' does not exists in XEmacs. +;; `with-temp-message' does not exist in XEmacs. (if (fboundp 'with-temp-message) (defalias 'tramp-compat-with-temp-message 'with-temp-message) (defmacro tramp-compat-with-temp-message (message &rest body) @@ -292,7 +292,7 @@ Not actually used. Use `(format \"%o\" i)' instead?" (error "Non-octal junk in string `%s'" x)) (string-to-number ostr 8))) -;; ID-FORMAT does not exists in XEmacs. +;; ID-FORMAT does not exist in XEmacs. (defun tramp-compat-file-attributes (filename &optional id-format) "Like `file-attributes' for Tramp files (compat function)." (cond diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index c2fdc0491b6..e25c9bd4caf 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -435,6 +435,8 @@ Every entry is a list (NAME ADDRESS).") (file-name-nondirectory . tramp-handle-file-name-nondirectory) ;; `file-name-sans-versions' performed by default handler. (file-newer-than-file-p . tramp-handle-file-newer-than-file-p) + (file-notify-add-watch . tramp-handle-file-notify-add-watch) + (file-notify-rm-watch . ignore) (file-ownership-preserved-p . ignore) (file-readable-p . tramp-gvfs-handle-file-readable-p) (file-regular-p . tramp-handle-file-regular-p) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 281f497692d..c92eacd4473 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3334,7 +3334,8 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." ;; `process-file-side-effects' in order to keep the cache when ;; `process-file' calls appear. (let (process-file-side-effects) - (tramp-run-real-handler 'vc-registered (list file))))))) + (ignore-errors + (tramp-run-real-handler 'vc-registered (list file)))))))) ;;;###tramp-autoload (defun tramp-sh-file-name-handler (operation &rest args) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 65c52ae4f3c..fee34f856dd 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -209,6 +209,8 @@ See `tramp-actions-before-shell' for more info.") (file-name-nondirectory . tramp-handle-file-name-nondirectory) ;; `file-name-sans-versions' performed by default handler. (file-newer-than-file-p . tramp-handle-file-newer-than-file-p) + (file-notify-add-watch . tramp-handle-file-notify-add-watch) + (file-notify-rm-watch . ignore) (file-ownership-preserved-p . ignore) (file-readable-p . tramp-handle-file-exists-p) (file-regular-p . tramp-handle-file-regular-p) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 3513701d20e..db6a1e381a6 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1980,8 +1980,8 @@ ARGS are the arguments OPERATION has been called with." ;; Emacs 22+ only. 'set-file-times ;; Emacs 24+ only. - 'file-acl 'file-notify-add-watch 'file-selinux-context - 'set-file-acl 'set-file-selinux-context + 'file-acl 'file-notify-add-watch + 'file-selinux-context 'set-file-acl 'set-file-selinux-context ;; XEmacs only. 'abbreviate-file-name 'create-file-buffer 'dired-file-modtime 'dired-make-compressed-filename @@ -2036,8 +2036,9 @@ ARGS are the arguments OPERATION has been called with." default-directory) ;; PROC. ((eq operation 'file-notify-rm-watch) - (with-current-buffer (process-buffer (nth 0 args)) - default-directory)) + (when (processp (nth 0 args)) + (with-current-buffer (process-buffer (nth 0 args)) + default-directory))) ;; Unknown file primitive. (t (error "unknown file I/O primitive: %s" operation)))) @@ -3278,6 +3279,14 @@ beginning of local filename are not substituted." ;; for backward compatibility. (expand-file-name "~/")) +(defun tramp-handle-file-notify-add-watch (filename flags callback) + "Like `file-notify-add-watch' for Tramp files." + ;; This is the default handler. Some packages might have its own one. + (setq filename (expand-file-name filename)) + (with-parsed-tramp-file-name filename nil + (tramp-error + v 'file-notify-error "File notification not supported for `%s'" filename))) + ;;; Functions for establishing connection: ;; The following functions are actions to be taken when seeing certain |
