I am trying to set the current line number to a variable in Elisp but keep getting a void-variable error!
The code is:
(setq x what-line)
I’d also like to set the total number of lines in the buffer to a variable as well, but get the same error?!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How to find out about this kind of thing? Try M-x
find-functionRETwhat-lineRET to see the source code ofwhat-line. Readingsimple.el(the file in whichwhat-lineis defined) is a good way to get familiar with elementary Elisp programming.