Continuous functions as uniformly continuous function Three question concerninng metrics on the real line:
Is there a metric $d$ on $\Bbb{R}$ such that a function $f : (\Bbb{R},d) \longrightarrow (\Bbb{R},d)$  ( or  $f : \Bbb{R} \longrightarrow (\Bbb{R},d)$ or $f : (\Bbb{R},d) \longrightarrow \Bbb{R}$)  is continuous if and only if $f : \Bbb{R} \longrightarrow \Bbb{R}$ is uniformly continuous ? 
 A: EDIT: The answer now applies to arbitrary topologies, using an idea by Pietro Majer from the comments.
Proposition: There are no topologies $\tau_0,\tau_1$ on $\mathbb R$ such that $f\colon\mathbb R\to\mathbb R$ is uniformly continuous in the Euclidean metric iff $f\colon(\mathbb R,\tau_0)\to(\mathbb R,\tau_1)$ is continuous.
Proof:
$\tau_1$ cannot be indiscrete (lest all functions are uniformly continuous), hence we can fix a $\tau_1$-closed set $F$ and points $a\in F$, $b\notin F$. For every Euclidean closed set $A$ and $c>0$, let $f_c(x)=a+c\operatorname{dist}(x,A)$. Then $f_c$ is uniformly continuous, hence continuous from $(\mathbb R,\tau_0)$ to $(\mathbb R,\tau_1)$, hence the $\tau_0$-closed set $f_c^{-1}(F)$ includes $A$ and excludes all points of Euclidean distance $(b-a)/c$ from $A$. The intersection of such sets for all $c$ is just $A$. This shows that $A$ is $\tau_0$-closed, i.e., $\tau_0$ refines the Euclidean topology.
Let $f\colon\mathbb R\to\mathbb R$ be a Euclidean-continuous but not uniformly continuous function, such as $f(x)=x^2$. For every $n>0$, $f_n=f\restriction[-n,n]$ can be extended to a uniformly continuous function on $\mathbb R$. By assumption, this function is continuous from $(\mathbb R,\tau_0)$ to $(\mathbb R,\tau_1)$, hence $f_n$ is continuous from $([-n,n],\tau_0)$ to $(\mathbb R,\tau_1)$. Since $\tau_0$ refines the Euclidean topology, every point has a $\tau_0$-open neighbourhood included in some $[-n,n]$, thus $f=\bigcup_nf_n$ is continuous from $(\mathbb R,\tau_0)$ to $(\mathbb R,\tau_1)$. However, it is not uniformly continuous in the Euclidean metric, a contradiction.
A: The answer is no at least in the assumptions given in parentheses.
Assume $C(\mathbb{R}, (\mathbb{R},d)) = UC(\mathbb{R},\mathbb{R})$. Since $\operatorname{id}_\mathbb{R}$ is in $ UC(\mathbb{R},\mathbb{R})$ it is also in $C(\mathbb{R}, (\mathbb{R},d))$. So any $f\in C(\mathbb{R}, \mathbb{R})$ is also in $C(\mathbb{R}, (\mathbb{R},d))$ by composition. But then $C(\mathbb{R}, \mathbb{R})\subset UC(\mathbb{R},\mathbb{R})$, a contradiction.
Assume $C((\mathbb{R},d), \mathbb{R}) = UC(\mathbb{R},\mathbb{R})$. Then  $\operatorname{id}_\mathbb{R}$ is in  $C^0((\mathbb{R},d), \mathbb{R}) $, that is the Euclidean topology is included in the $d$-topology. On the other hand, consider any convergent sequence $x_n\to x$ in the Euclidean topology. Since the function $d(x,\cdot): (\mathbb{R},d)\to \mathbb{R}$ is continuous (it is 1-Lipschitz), it is also in $UC(\mathbb{R},\mathbb{R})$, so in particular $d(x,x_n)\to d(x,x)=0$, that is $x_n\to x$ in $d$. Therefore the two topologies coincide which leads again to the contradiction  $C(\mathbb{R}, \mathbb{R}) = UC(\mathbb{R},\mathbb{R})$.
A: $\mathbf{Proposition}$ Suppose that $d,\rho$ are metrics on $\mathbb{R}$ that induce the Euclidean topology on $\mathbb{R}$. Then there is a bounded continuous function $f:(\mathbb{R},d)\rightarrow(\mathbb{R},\rho)$ which is not uniformly continuous.
$\mathbf{Proof}$ If $n$ is a positive integer, then there is some $\epsilon_{n}$ where $0<\epsilon_{n}<1$ and where $d(n,n+\epsilon_{n})<\frac{1}{n}$. There is a continuous function $f:\mathbb{R}\rightarrow[0,1]$ with $f(n)=0$ but $f(n+\epsilon_{n})=1$ for all $n$. However, the function $f$ cannot be uniformly continuous. If $\epsilon>0$, then $\frac{1}{n}<\epsilon$ for some $n$, and $d(n,n+\epsilon_{n})<\frac{1}{n}$, but $\rho(f(n),f(n+\epsilon_{n}))=\rho(0,1)>0$.
