emacs/elisp:哈希(磅、数字符号、octothorp)符号是做什么用的? [英] emacs/elisp: What is the hash (pound, number sign, octothorp) symbol used for?

查看:13
本文介绍了emacs/elisp:哈希(磅、数字符号、octothorp)符号是做什么用的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是做什么的?

(add-hook 'compilation-mode-hook #'my-setup-compile-mode)

...它和

(add-hook 'compilation-mode-hook 'my-setup-compile-mode)

推荐答案

没有区别:

(eq 'my-add #'my-add)

产量 t

# 可以用在 lambda 表达式的前面,指示字节编译器可以对以下表达式进行字节编译,请参阅 匿名函数.但是在符号的情况下没有什么可以编译的.

The # can be used in front of a lambda expression indicating to the byte-compiler that the following expression can be byte compiled, see the docs for Anonymous Functions. But there's nothing to compile in the case of a symbol.

一般在打印的表示 以及左尖括号 (<) 表示打印的对象是描述(但无法读取).例如:

In general, it is used in the printed representation along with the left angle bracket (<) to indicate that the object printed is a description (but cannot be read). For example:

#<buffer foo.txt>

它也被读者用在结构中来表示圆形结构.请参阅阅读循环对象语法的文档.

It is also used in constructs by the reader to represent circular structures. See the docs for Read Syntax for Circular Objects.

然后你可以用它来表示 整数基,例如<代码>#x2c ->44.

And then you have its use for denoting the base for integers, e.g. #x2c -> 44.

我敢肯定还有更多.

这篇关于emacs/elisp:哈希(磅、数字符号、octothorp)符号是做什么用的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆