]> code.delx.au - gnu-emacs/blobdiff - lisp/ffap.el
Change indian-1-column charset to indian-glyph charset.
[gnu-emacs] / lisp / ffap.el
index 37ce66794575c492bc44321d7b169e26cbe286d9..fcded84e40273fccd2c0fe99f60f830e4830af22 100644 (file)
@@ -35,9 +35,8 @@
 ;; README's, MANIFEST's, and so on.  Submit bugs or suggestions with
 ;; M-x ffap-bug.
 ;;
-;; For the default installation, add these two lines to your .emacs file:
+;; For the default installation, add this line to your .emacs file:
 ;;
-;; (require 'ffap)                      ; load the package
 ;; (ffap-bindings)                      ; do default key bindings
 ;;
 ;; ffap-bindings makes the following global key bindings:
@@ -397,6 +396,7 @@ Returned values:
       (cond
        ((eq strategy 'accept) 'accept)
        ((eq strategy 'reject) nil)
+       ((not (fboundp 'open-network-stream)) nil)
        ;; assume (eq strategy 'ping)
        (t
        (or quiet
@@ -1216,6 +1216,10 @@ which may actually result in an url rather than a filename."
      (t t))))
 
 (defun ffap-read-file-or-url-internal (string dir action)
+  (unless dir
+    (setq dir default-directory))
+  (unless string
+    (setq string default-directory))
   (if (ffap-url-p string)
       (ffap-read-url-internal string dir action)
     (read-file-name-internal string dir action)))
@@ -1686,13 +1690,14 @@ ffap most of the time."
      ;; (setq dired-x-hands-off-my-keys t) ; the default
      )
      "List of binding forms evaluated by function `ffap-bindings'.
-A reasonable ffap installation needs just these two lines:
-  (require 'ffap)
+A reasonable ffap installation needs just this one line:
   (ffap-bindings)
 Of course if you do not like these bindings, just roll your own!")
 
+;;;###autoload
 (defun ffap-bindings nil
   "Evaluate the forms in variable `ffap-bindings'."
+  (interactive)
   (eval (cons 'progn ffap-bindings)))
 
 \f