Re: emacs rendering comparisson between emacs23 and emacs26.3

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: emacs rendering comparisson between emacs23 and emacs26.3

Eli Zaretskii
> Date: Sat, 28 Mar 2020 11:43:01 +0000
> Cc: [hidden email], [hidden email], [hidden email]
> From: Alan Mackenzie <[hidden email]>
>
> (defvar loaded-cc-version nil)
> (defun load-cc-version (dir)
>   "Load the version of CC Mode contained in directory DIR."
>   (interactive "D")
>   (or (string-match "/$" dir)
>       (setq dir (concat dir "/")))
>   (let (fname)
>     ;; `c-fallback-style' gets stuff pushed onto it by loading cc-vars.  So
>     ;; clear it out first, after a quick and dirty sanity check.
>     (if (file-exists-p (concat dir "cc-vars.elc"))
>         (setq c-fallback-style nil))
>     (mapc (lambda (f)
>             (condition-case err
>                 (load-file (setq fname (concat dir "cc-" f ".elc")))
>               (error (message "Couldn't load %s" fname))))
>           '("defs" "vars" "fix" "engine" "cmds" "menus"
>             "align" "styles" "awk" "fonts" "mode"
>             "subword" "bytecomp" "compat" "guess"))
>     (setq loaded-cc-version dir)))

Thanks, but when I use this command to load CC Mode from Emacs 23.4,
and then visit xdisp.c, I get an error message:

  File mode specification error: (void-function make-local-hook)

and CC mode is not turned on.  What am I missing?