How to print all the defined variables in emacs?

前端 未结 3 1732
一个人的身影
一个人的身影 2020-12-18 00:30

M-x < TAB > prints all the defined functions.

To check a variable is defined or not evaluating the following expression, (boundp \'variable-name) C-x C-e will pr

3条回答
  •  盖世英雄少女心
    2020-12-18 01:21

    Extrapolating (heavily!) what is being asked for, here is a way to get a pretty-printed alist of all buffer-local variables with their values. This is very convenient for finding out why for instance a mode isn't behaving the way one expects.

    To get this listing, do:

    M-x pp-eval-expression RET (buffer-local-variables) RET
    

    Relevant portions from this list can be added almost verbatim to a .dir-locals.el file for use with multiple files.

提交回复
热议问题