ljz@fx.com (Lloyd Zusman) (02/14/89)
I'm running GNU Emacs 18.52 under SunOS 3.5 on a network of Sun 3/xxx's, and I have a couple of questions: 1) Is it possible to cause a buffer to *not* recenter itself when it automatically scrolls? I'd like certain buffers (but not every buffer) to scroll so that the line with the point on it ends up at the bottom of the screen instead of the middle. I can do this manually via "(recenter -1)", but I'm talking about the automatic scrolling that occurs when the cursor is on the bottom line and I do a downward cursor motion, and the other automatic scrolling that occurs when an "(insert ...)" is done with text that would print beyond the bottom of the buffer. 2) My next question involves the following Elisp code fragment: (setq my-variable "variable's value") (fset 'my-variable '(lambda () "variable's function return")) If I evaluate my-variable the result is "variable's value", and if I evaluate (my-variable) the result is "variable's function return". This is well and good, but now for my question: Is there any way, through macros, obscure functions, or whatever, for me to do something to "my-variable" so that its function gets evaluated when I type its name without the enclosing parentheses? In other words, I'd like to evaluate my-variable and have it perform the function in its function cell just as if I had evaluated (my-variable) It isn't absolutely necessary for my-variable's function cell to get evaluated ... actually, all I want is for *some* function of my choosing to be evaluated when my-variable is evaluated without any parentheses. The reason I want this is so I can change existing Elisp defvar elements to invoke a function of my choosing when they are evaluated, instead of returning their value cells. Any suggestions? Thanks in advance for your help. -- Lloyd Zusman, Master Byte Software, Los Gatos, California "We take things well in hand." Net access courtesy of FX Development Group, Inc., Mountain View, California Internet: ljz@fxgrp.fx.com uucp: ...!ames!fxgrp!ljz
eliot@phoenix.Princeton.EDU (Eliot Handelman) (02/14/89)
In article <LJZ.89Feb13180314@fxgrp.fx.com> ljz@fx.com (Lloyd Zusman) writes: >I'm running GNU Emacs 18.52 under SunOS 3.5 on a network of Sun 3/xxx's, and >I have a couple of questions: [I don't know the answer to your first question] >2) My next question involves the following Elisp code fragment: > Is there any way, through macros, obscure functions, or whatever, > for me to do something to "my-variable" so that its function > gets evaluated when I type its name without the enclosing > parentheses? I don't know that much about Emacs Lisp but in most lisps you would have to do redefine the read-eval-print loop. Essentially what you would then want would be a global variable onto which you could push variables that were meant to be called as functions. Your loop would then have to check if the expression were an atom, and if so it would look for membership in your global var. If found, you could then funcall it. All of this is easy in Common Lisp, I don't know how much of a pain it would be in Elisp. Basically, it's easier to type the parens. Also you wouldn't be able to pass parameters to functions that were meant to be run in this way. Seems to me that your best bet is just to bind some key to your function.
monnie@rruxh.UUCP (Nariman Shambayati) (02/09/90)
I have gnuemacs on a Pyramid and on a sun 3/60. When I run ctags on my c files and then try tags-search, it tells me that my TAGS file is not a valid tag table. What I am doing wrong? Also, on the sun 3/60, when I startup, it gives me error in init file. I am not using any site init files and when I load my .emacs file, it is fine. Where does this error come from? (Note:, I don't get this on the Pyramid) I am running gnu emacs 18.54 -- ....bellcore!rruxh!monnie or rruxh!monnie@thumper.bellcore.com