Emacs lisp评估变量 [英] Emacs lisp evaluate variable in alist

查看:98
本文介绍了Emacs lisp评估变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是 Emacs Lisp:评估变量in alist ..
我试图在我的 .emacs 文件中设置 default-frame-alist 。考虑,例如

This is a follow-up question to Emacs Lisp: evaluate variable in alist.. I am trying to set default-frame-alist in my .emacs file. Consider, e.g.

(setq default-frame-alist
      '((auto-lower . nil)
        (auto-raise . nil)
        (height . 41)
        (width . 80)
        (top . 1)
        (left . 1)))

(我省略了一些值)这工作正常..假设现在我想设置 height 根据另一个变量。所以我将整数值50存储在变量 my-height ..如何我可以将 height 设置为 my-height 的值吗?我试过

(I have omitted some values) This works fine.. Suppose now I want set the height according to another variable..Say, I stored the integer value 50 in the variable my-height.. How can I set height to the value of my-height ? I have tried


  • (height。my-height)

  • ``(height。,my-height)`

但两者都没有。

推荐答案

您需要反馈整个表单:

(setq default-frame-alist
      `((auto-lower . nil)
        (auto-raise . nil)
        (height . ,my-height)
        (width . 80)
        (top . 1)
        (left . 1)))

这篇关于Emacs lisp评估变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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