all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* port x-symbol to GNU emacs 24.
@ 2015-08-14 14:43 Uwe Brauer
  2015-08-14 14:58 ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: Uwe Brauer @ 2015-08-14 14:43 UTC (permalink / raw)
  To: emacs-devel; +Cc: XEmacs Beta Discussion


Hello

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
partially.

   - 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,
   "-adobe-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-1"
  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
24.4??

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 from
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"
(map-extents FUNCTION &optional OBJECT FROM TO MAPARG FLAGS PROPERTY VALUE)

`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
one.

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

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




^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2015-08-21 13:19 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 14:43 port x-symbol to GNU emacs 24 Uwe Brauer
2015-08-14 14:58 ` Eli Zaretskii
2015-08-14 15:16   ` Uwe Brauer
2015-08-14 15:30     ` David Kastrup
2015-08-14 18:15       ` Uwe Brauer
2015-08-14 16:05     ` Tassilo Horn
2015-08-14 17:21       ` Stefan Monnier
2015-08-14 18:19       ` Uwe Brauer
2015-08-17  7:29         ` Tassilo Horn
2015-08-17 15:10           ` Eli Zaretskii
2015-08-17 15:20             ` David Kastrup
2015-08-17 15:36               ` Eli Zaretskii
2015-08-18  8:38               ` Tassilo Horn
2015-08-18 15:52                 ` Stefan Monnier
2015-08-19  7:33                   ` Tassilo Horn
2015-08-19 12:33                     ` Tassilo Horn
2015-08-19 16:34                       ` Tassilo Horn
2015-08-19 17:29                     ` Stefan Monnier
2015-08-19 19:05                       ` Tassilo Horn
2015-08-19 21:43                         ` Stefan Monnier
2015-08-21  6:21                           ` Tassilo Horn
2015-08-21  7:28                             ` David Kastrup
2015-08-21  8:44                               ` Tassilo Horn
2015-08-21  9:51                                 ` David Kastrup
2015-08-21 13:08                                   ` Tassilo Horn
2015-08-20  8:11                       ` Generalizing prettify-symbols-mode (was: port x-symbol to GNU emacs 24.) Tassilo Horn
2015-08-20 14:15                         ` Generalizing prettify-symbols-mode Stefan Monnier
2015-08-21  6:48                           ` Tassilo Horn
2015-08-21  7:43                             ` Tassilo Horn
2015-08-21 13:19                               ` Stefan Monnier
2015-08-14 18:38       ` port x-symbol to GNU emacs 24 Uwe Brauer
2015-08-17  1:59     ` Stephen J. Turnbull
2015-08-17  9:20       ` Uwe Brauer
2015-08-17 10:50         ` Stephen J. Turnbull
2015-08-17 11:12           ` David Kastrup

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.