[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: emacs22 lenny текст на русском



> Artem Chuprina <ran@ran.pp.ru> writes:

 >> На самом деле фигня еще в том, что где-то надо, чтобы обрезало, а где-то
 >> - чтобы нет.  Вот сейчас, например, у меня в левом нижнем окне обрезает
 >> по делу (там Group buffer, там если будет заворачивать, будет еще хуже),
 >> а в окне сообщения - не по делу...  Т.е. это надо еще по хукам
 >> рассовывать.

> Ага. Вся пакость этой переменной в том, что она не buffer-local, а
> глобальная.
> То есть управлять переносами в широкоэкранном режиме лучше
> выключив эту переменную глобально, а щелкать в хуках
> truncate-lines.

На мой взгляд не лучше.

make-local-variable is an interactive built-in function in `C source code'.
(make-local-variable VARIABLE)

Make VARIABLE have a separate value in the current buffer.
Other buffers will continue to share a common default value.
(The buffer-local value of VARIABLE starts out as the same value
VARIABLE previously had.  If VARIABLE was void, it remains void.)
Return VARIABLE.

If the variable is already arranged to become local when set,
this function causes a local value to exist for this buffer,
just as setting the variable would do.

This function returns VARIABLE, and therefore
  (set (make-local-variable 'VARIABLE) VALUE-EXP)
works.

See also `make-variable-buffer-local'.

Do not use `make-local-variable' to make a hook variable buffer-local.
Instead, use `add-hook' and specify t for the LOCAL argument.

-- 
Best regards, Aleksey Cheusov.


Reply to: