elisp之函数
2015-11-23 18:21
405 查看
# cat /root/elisp/function.el (defun variable_arity (a &optional b &rest c) "This is a function which has variable arity" (message (concat "variable a is " a)) (message (concat "variable b is " b)) (if c (message "c is not an empty list") (message "c is an empty list"))) (message "run the fn with 1 variable") (variable_arity "eh") (message "run the fn with 2 variables") (variable_arity "eh" "bee") (message "run the fn with 3 variables") (variable_arity "eh" "bee" "see") (message "run the fn with 4 variables") (variable_arity "eh" "bee" "see" "dee") (message "run the fn with 5 variables") (variable_arity "eh" "bee" "see" "dee" "eee")
如何在命令行执行:
# emacs --no-site-file --script /root/elisp/function.el run the fn with 1 variable variable a is eh variable b is c is an empty list run the fn with 2 variables variable a is eh variable b is bee c is an empty list run the fn with 3 variables variable a is eh variable b is bee c is not an empty list run the fn with 4 variables variable a is eh variable b is bee c is not an empty list run the fn with 5 variables variable a is eh variable b is bee c is not an empty list
本文出自 “固态U盘” 博客,请务必保留此出处http://lavenliu.blog.51cto.com/5060944/1716091
相关文章推荐
- Facebook获取Key Hashes
- 深入浅出Android Support Annotations
- AR--摄像机标定
- Hangover poj1003
- 【Android进阶学习】监听EditText的变化
- Ubuntu14.04 安装 tensorflow
- 区间相关贪心问题
- 《Objective-c开发范例代码大全》
- HighCharts、EChart图表X轴纵向显示
- 区间相关贪心问题
- ASP.NET动态网站制作(29)-- 正则
- coco2d-js 无法加载网络图片(Failed to execute 'texImage2D' on ‘WebGLRenderin
- socket被dce使用的情况
- 如何动态设置EditText输入的文字为密码形式
- kali的源
- 三、JavaScript语句
- 修改 “嗨加游-Prefix.pch” 或者 “嗨加游-Info.plist ” 方法
- 多态图标(1)-PS制作
- linux tar的用法
- linux socket 缓冲区默认大小