Comments (5)
(xxx-mode t)和(xxx-mode)不一样。前者turn on 后者toggle。在这里一样。我自己写了个宏来处理这个问题,用数字1和-1。
from spacemacs-rocks.
Note that ' matches the end of a string, where as $ matches the empty string before a newline. Thus, $ may lead to unexpected behavior when dealing with filenames containing newlines. (Should be pretty rare… ;))
backtick同理。
boundary anchors
Pattern Matches
^… Beginning of {line, string, buffer}
…$ End of {line, string, buffer}
`… Beginning of {string, buffer}
…' End of {string, buffer}
\b word boundary marker
from spacemacs-rocks.
Eli
是我写错了。- 所有文中的 Emacs Lisp 的注释均使用
;;
。 - 我
(xxx-mode t)
我马上会将文字版中的t
全部换成1
来统一格式。
from spacemacs-rocks.
(xxx-mode t)和(xxx-mode)不一样。前者turn on 后者toggle。在这里一样。我自己写了个宏来处理这个问题,用数字1和-1。
这两者是一样的(如果不一样的话,证据是什么?)
(delete-selection-mode)
⇒ t
(delete-selection-mode t)
⇒ t
(delete-selection-mode 'toggle)
⇒ nil
从 Lisp 调用和交互式调用,对参数的解释不一样,这里我们讨论的是前者。
Note that ' matches the end of a string, where as $ matches the empty string before a newline. Thus, $ may lead to unexpected behavior when dealing with filenames containing newlines. (Should be pretty rare… ;))
清楚一些了。(引用自哪里?)
from spacemacs-rocks.
引用自EmacsWiki AutoModeList。下面的表来自Xah Emacs。
;; The actual function.
(defun ,modefun (&optional arg ,@extra-args)
,(or doc
(format (concat "Toggle %s on or off.
With a prefix argument ARG, enable %s if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
\\{%s}") pretty-name pretty-name keymap-sym))
;; Use `toggle' rather than (if ,mode 0 1) so that using
;; repeat-command still does the toggling correctly.
(interactive (list (or current-prefix-arg 'toggle)))
恩,不过有的地方(比如hydra)会调用funcall-interactively。要小心。
(,@setter
(if (eq arg 'toggle)
(not ,getter)
;; A nil argument also means ON now.
(> (prefix-numeric-value arg) 0)))
所以还是-1稳妥。
from spacemacs-rocks.
Related Issues (20)
- MarkSet的颜色设置 HOT 1
- 第15天的标题错误 HOT 2
- org mode时按C+c a a 出来的日程表和文件不一样 HOT 2
- `dotspacemacs-configuration-layers` 无法设置变量
- emacs批量操作文件夹中文件名矩形选择无法编辑
- require 'org-install is obsolete since emacs 26.1
- When add pkg installed everytime, you have to reboot your emacs.
- emacs的包管理器里面没有company
- show-paren-mode打开Python大文件非常卡顿
- 感谢子龙的视频教程 HOT 4
- evil安装不了 HOT 1
- howdo HOT 1
- 求上传一份视频教程到Bilibili. HOT 2
- 只有16天啊 HOT 1
- travis构建失效了 HOT 1
- 21天学会Emacs 2022高清重制版
- 安装cask(day8) HOT 4
- pallet-install失败(day8)
- Day16 ctags自动补全
- typo in README.org HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spacemacs-rocks.