[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Java-mode Debug question ?
From: |
Francis Belliveau |
Subject: |
Re: Java-mode Debug question ? |
Date: |
Sun, 18 Nov 2018 10:32:59 -0500 |
All,
At this point I must apologize to the list here for my initial question. It
seems that I broke my cardinal rule to check customizations for issues before
resorting to asking a question here.
Eli's suggestion cause me to realize that I had forgotten to check all my
customizations when I installed this new version some months back.
As it turns out there is a piece of code in one of my customizations that is
the culprit.
(if (need-extra-port-fixes-p)
(progn
(defvar c-mode-map ()
"Keymap used in c-mode buffers.")
;; c-inside-parent-p was taken from c-mode.el of emacs-19.30
;; because it loads cc-mode.el which doesn't have this function.
(defun c-inside-parens-p ()
(condition-case ()
(save-excursion
(save-restriction
(narrow-to-region (point)
(progn (beginning-of-defun) (point)))
(goto-char (point-max))
(= (char-after (or (scan-lists (point) -1 1) (point-min)))
?\()))
(error nil)))
))
I can see a couple of funny things here so I am back here asking some better
questions. You can assume that (need-extra-port-fixes) is true, since this is
causing a problem, but that part of the code is not important.
First, I am not sure about the comment that mentions c-inside-parent-p, I
assume that is a typo and what I am trying to do is "import" this function from
a previous version.
This clearly runs while loading a custom package that relies heavily on
knowing if "point" is within parentheses.
I expect that c-mode has yet to be initialized when this runs and some
portion of behavior has changed with regard to c-mode-map being created by this
code and then later used when c-mode is actually initialized.
Second thing is why would such code be putting this defun into c-mode-map
without any keystroke?
Third, is there a newer function that I can use in place of this?
I have clearly not spent any time digging deep into elisp in a long time and
therefore do not know what has been developed
Looking forward to learning more.
Thanks for your help.
Fran
> On Nov 18, 2018, at 07:34, Francis Belliveau <f.belliveau@comcast.net> wrote:
>
> No, There is only one "shadow" listed and that is "sort". Getting rid of
> that did not help.
>
>
>> On Nov 17, 2018, at 12:51, Eli Zaretskii <eliz@gnu.org> wrote:
>>
>>> From: Francis Belliveau <f.belliveau@comcast.net>
>>> Date: Sat, 17 Nov 2018 12:39:34 -0500
>>>
>>> I am running emacs Version 26.1 (9.0) on OSX 10.13.6
>>> I know that I downloaded and installed this earlier this year and have not
>>> used Java-mode, or c-mode, with this version until today.
>>>
>>> When I try entering Java-mode I get an error indicating that there is a
>>> problem, with a key-map. This happens with c-mode also. Clearly there is
>>> something wrong with the install, but I have no clue where to look for the
>>> problem.
>>>
>>> Setting debug-on-error provides the following information:
>>>
>>> Debugger entered--Lisp error: (wrong-type-argument keymapp nil)
>>> define-key(nil "\003\005" c-macro-expand)
>>> autoload-do-load((autoload "cc-mode" 889279 t nil) java-mode)
>>> command-execute(java-mode record)
>>> execute-extended-command(nil "java-mode" "java-mode")
>>> funcall-interactively(execute-extended-command nil "java-mode" "java-mode")
>>> call-interactively(execute-extended-command nil nil)
>>> command-execute(execute-extended-command)
>>>
>>> Any help will be appreciated.
>>
>> Does "M-x list-load-path-shadows RET" give any clue?
>>
>
>
- Re: Where is Emacs Lisp taught ?, (continued)