X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/f9acac751d4cd22480e62cc63936b1208ca9fe48..37ad855a38786722833d06dfe78786acc7e9f412:/lisp/dnd.el diff --git a/lisp/dnd.el b/lisp/dnd.el index 2b68b025ac..3e161dcfb5 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -1,6 +1,6 @@ ;;; dnd.el --- drag and drop support. -*- coding: utf-8 -*- -;; Copyright (C) 2005-2014 Free Software Foundation, Inc. +;; Copyright (C) 2005-2015 Free Software Foundation, Inc. ;; Author: Jan Djärv ;; Maintainer: emacs-devel@gnu.org @@ -122,17 +122,17 @@ Return nil if URI is not a local file." ;; The hostname may be our hostname, in that case, convert to a local ;; file. Otherwise return nil. TODO: How about an IP-address as hostname? - (let ((system-name (system-name))) + (let ((sysname (system-name))) (let ((hostname (when (string-match "^file://\\([^/]*\\)" uri) (downcase (match-string 1 uri)))) - (system-name-no-dot - (downcase (if (string-match "^[^\\.]+" system-name) - (match-string 0 system-name) - system-name)))) + (sysname-no-dot + (downcase (if (string-match "^[^\\.]+" sysname) + (match-string 0 sysname) + sysname)))) (when (and hostname (or (string-equal "localhost" hostname) - (string-equal (downcase system-name) hostname) - (string-equal system-name-no-dot hostname))) + (string-equal (downcase sysname) hostname) + (string-equal sysname-no-dot hostname))) (concat "file://" (substring uri (+ 7 (length hostname)))))))) (defsubst dnd-unescape-uri (uri)