[Top][All Lists]

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

port x-symbol to GNU emacs 24.

From: Uwe Brauer
Subject: port x-symbol to GNU emacs 24.
Date: Fri, 14 Aug 2015 14:43:30 +0000
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.4 (gnu/linux)


The latest version of the x-symbol package is from 2003, but it still
provides useful features, especially for editing LaTeX files, I have not
seen in any other packages. Originally developed only for Xemacs, the
latest versions contain a GNU emacs specific file, x-symbol-emacs.el.
Moreover I do remember that it run under GNU emacs 21, although I forgot
the details.

Be it as it may, I tried to run x-symbol now under GNU emacs 24.4:
Byte compilation did not cause any problems but when I tried to load
the package I run into a series of problems, which I could only solve

   - the function make-local-hook is not defined, I just copied its (xemacs)
     definition into x-symbol-emacs.el (I attach its definition  at the end
     of the message and it seems to work.

 - x-symbol-set-face-font: Wrong type argument: listp,
  although I had debug-on-error t, I did not obtain more details about
   the error.
   The definition of x-symbol-set-face-font is as follows 

(defun x-symbol-set-face-font (face font charsets default)
  (let ((fontset (concat "fontset-" (symbol-name face))))
    (unless (query-fontset fontset)
      ;; We assume that the first time around we're using latin-8859-1
      (new-fontset fontset
                   (x-complement-fontset-spec (make-vector 14 "*")
                                              (list (cons 'ascii font)))))
    (dolist (charset charsets)
      (when charset (set-fontset-font fontset charset font)))
    (set-face-font face fontset)))

But it seems GNU emacs 24.4 now treats fonts differently. Anybody has
a suggestion how to modify this function so that it is compatible with

The next two errors are more serious.

 - eval-buffer: Symbol's function definition is void: remove-specifier
   [2 times] `Type C-x 1 to delete the help window, C-M-v to scroll help.

 - eval-buffer: Symbol's function definition is void: map-extents
   [2 times] `Type C-x 1 to delete the help window, C-M-v to scroll help.

Now both functions are built-in functions defined in C and I don't
know how to continue. Any changes of defining an alias for a similar function 
GNU emacs???

I really wounder how x-symbol could have worked with GNU emacs 21.

`map-extents' is a built-in function
  -- loaded from "/home/oub/xemacs-mercury/xemacs/src/extents.c"

`remove-specifier' is a built-in function
  -- loaded from "/home/oub/xemacs-mercury/xemacs/src/specifier.c"
(remove-specifier SPECIFIER &optional LOCALE TAG-SET EXACT-P)

Thanks and regards 

Uwe Brauer 

Definition fo make-local-hook

(defun make-local-hook (hook)
The return value is HOOK.

You never need to call this function now that `add-hook' does it for you
if its LOCAL argument is non-nil.

When a hook is local, its local and global values
work in concert: running the hook actually runs all the hook
functions listed in *either* the local value *or* the global value
of the hook variable.

This function works by making `t' a member of the buffer-local value,
which acts as a flag to run the hook functions in the default value as
well.  This works for all normal hooks, but does not work for most
non-normal hooks yet.  We will be changing the callers of non-normal
hooks so that they can handle localness; this has to be done one by

This function does nothing if HOOK is already local in the current

Do not use `make-local-variable' to make a hook variable buffer-local."
  (if (local-variable-p hook (current-buffer)) ; XEmacs
    (or (boundp hook) (set hook nil))
    (make-local-variable hook)
    (set hook (list t)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]