Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242716 - app-editors/xemacs-{21.4.21-r1,21.5.28-r4} font-lock problem
Summary: app-editors/xemacs-{21.4.21-r1,21.5.28-r4} font-lock problem
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: XEmacs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-19 08:28 UTC by Ulrich Müller
Modified: 2016-08-25 22:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2008-10-19 08:28:09 UTC
Hi, when debugging app-xemacs/gentoo-syntax (ebuild-mode-keywords.el) I've noticed the following problem with font-lock mode.

To reproduce:
1. xemacs -q # 21.5.28-r4
2. M-x font-lock-mode RET
3. Evaluate the following expression in the *scratch* buffer (this is the
   first example from the documentation of "font-lock-add-keywords", only with
   'c-mode replaced by nil):

     (font-lock-add-keywords nil
      '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)
        ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)))

This returns the following form:
(t
 ("\\<\\(FIXME\\):"
  (1 font-lock-warning-face prepend))
 ("\\<\\(and\\|or\\|not\\)\\>"
  (0 font-lock-keyword-face))
 ("^(\\(def\\(\\(un\\|advice\\|alias\\|macro\\*?\\|setf\\|subst\\*?\\|-edebug-spec\\|method\\|generic\\|ine-\\(?:compiler-macro\\|function\\|function-when-void\\|modify-macro\\|setf-method\\|compatible-function-alias\\|obsolete-function-alias\\|ccl-program\\|device-method\\*?\\|prefix-command\\|skeleton\\)\\)\\|\\(class\\|struct\\|type\\)\\)\\>\\|def\\([^ 	\n()]+\\)\\)\\>[ 	'(]*\\([^ 	\n()]+\\)?"
  (0 font-lock-keyword-face))
 (1
  (font-lock-keyword-face))
 (6
  (cond
   ((match-beginning 3)
    'font-lock-function-name-face)
   ((match-beginning 4)
    'font-lock-type-face)
   (t
    'font-lock-variable-name-face))
  nil t))

... and produces an error:

(6) (general/warning) Error in unknown: Invalid function: 1

Backtrace follows:

  1(1439)
  # bind (highlights matcher keyword nkeywords iter old-progress progress bufname keywords case-fold-search loudly loudvar end start)
  font-lock-fontify-keywords-region(701 1439 nil)
  # (unwind-protect ...)
  # bind (modified buffer-undo-list inhibit-read-only old-syntax-table buffer-file-name buffer-file-truename loudly end beg)
  font-lock-default-fontify-region(701 1439 nil)
  # bind (loudly end beg)
  font-lock-fontify-region(701 1439)
  # bind (val end beg)
  #<compiled-function (beg end val) "...(5)" [end beg font-lock-fontify-region] 3>(701 1439 t)
  map-range-table(#<compiled-function (beg end val) "...(5)" [end beg font-lock-fontify-region] 3> #<range-table [701 1439) t 0x3ac48>)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # bind (dummy buffer)
  #<compiled-function (buffer dummy) "...(47)" [font-lock-pending-buffer-table font-lock-range-table buffer remhash buffer-live-p clear-range-table map-extents #<compiled-function (ex dummy-maparg) "...(32)" [font-lock-range-table ex end beg extent-start-position extent-end-position 0 1 put-range-table t] 5> nil font-lock-pending t put-text-property map-range-table #<compiled-function (beg end val) "...(5)" [end beg font-lock-fontify-region] 3>] 9>(#<buffer "*scratch*"> t)
  # (unwind-protect ...)
  maphash(#<compiled-function (buffer dummy) "...(47)" [font-lock-pending-buffer-table font-lock-range-table buffer remhash buffer-live-p clear-range-table map-extents #<compiled-function (ex dummy-maparg) "...(32)" [font-lock-range-table ex end beg extent-start-position extent-end-position 0 1 put-range-table t] 5> nil font-lock-pending t put-text-property map-range-table #<compiled-function (beg end val) "...(5)" [end beg font-lock-fontify-region] 3>] 9> #<hash-table size 0/29 weakness key 0x3ac0a>)
  # (unwind-protect ...)
  # bind (match-data)
  font-lock-fontify-pending-extents()
  #<compiled-function nil "...(10)" [font-lock-pending-buffer-table hash-table-count 0 font-lock-fontify-pending-extents] 2>()
  # (unwind-protect ...)
  call-with-condition-handler(#<compiled-function (__call_trapping_errors_arg__) "...(17)" [__call_trapping_errors_arg__ errstr error-message-string lwarn general warning "Error in %s: %s\n\nBacktrace follows:\n\n%s" "unknown" backtrace-in-condition-handler-eliminating-handler] 8> #<compiled-function nil "...(10)" [font-lock-pending-buffer-table hash-table-count 0 font-lock-fontify-pending-extents] 2>)
  # (condition-case ... . ((error)))
  font-lock-pre-idle-hook()
  # (unwind-protect ...)
  # (catch #<INTERNAL OBJECT (XEmacs bug?) (opaque, size=0) 0x98e8020> ...)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # bind (inhibit-quit)
  # (unwind-protect ...)
  # (unwind-protect ...)
  # bind (inhibit-quit)
  (next-event "[internal]")
  # (condition-case ... . error)
  # (catch top-level ...)
Comment 1 Ulrich Müller gentoo-dev 2008-10-19 18:35:49 UTC
To clarify, the error message is not from evaluation of font-lock-add-keywords, but occurs during the following fontification of the buffer.
Comment 2 Mats Lidell gentoo-dev 2016-08-25 22:14:43 UTC
I can't reproduce this with latest xemacs ebuild - xemacs-21.5.34-r4.ebuild.