GNU bug report logs - #16290
23.4; csharp-mode advice to revert-buffer causes error when flymake-mode not loaded

Previous Next

Package: emacs;

Reported by: rpgoldman <at> sift.info (Robert P. Goldman)

Date: Sun, 29 Dec 2013 21:42:02 UTC

Severity: normal

Tags: notabug

Found in version 23.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16290 in the body.
You can then email your comments to 16290 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16290; Package emacs. (Sun, 29 Dec 2013 21:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to rpgoldman <at> sift.info (Robert P. Goldman):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 29 Dec 2013 21:42:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: rpgoldman <at> sift.info (Robert P. Goldman)
To: bug-gnu-emacs <at> gnu.org
Subject: 23.4;
 csharp-mode advice to revert-buffer causes error when flymake-mode
 not loaded
Date: Sun, 29 Dec 2013 15:40:30 -0600
The following advice is in csharp-mode:

(defadvice revert-buffer (around
                          csharp-advise-revert-buffer
                          activate compile)
  (let ((is-flymake-enabled
         (and (fboundp 'flymake-mode)
              flymake-mode)))
    ;; disable
    (if is-flymake-enabled
        (flymake-mode-off))

    ;; revert
    ad-do-it

    ;; enable
    (if is-flymake-enabled
        (flymake-mode-on))))

This assumes that (fboundp 'flymake-mode) implies that the variable
flymake-mode exists.

This assumption is incorrect.  (fboundp 'flymake-mode) will return true
if there is an autoload for flymake-mode, but that autoload has not been
forced yet.  Then a reference to the flymake-mode variable will cause an
error condition.


In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-08 on trouble, modified by Debian
configured using `configure  '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
i n d - f TAB u TAB RET RET C-x b RET ESC x a d - r 
e TAB m v TAB DEL o TAB RET r e v e r TAB RET q C-x 
b M i TAB RET ESC x r e v e r t - b u TAB RET d q C-x 
b f l TAB RET C-x 1 C-h v f l y TAB C-g ESC < C-s m 
a k e - m i n o r - C-a C-s m i n o r - m o d e C-a 
C-e C-a ESC f ESC h C-x o C-h f RET C-x o C-a C-x o 
C-a ESC 2 C-@ C-g C-x 1 C-d e f i n e - m i n o r C-r 
C-r ESC < C-s d e f i n e - m C-a C-@ ESC C-f ESC x 
m a c TAB r TAB DEL DEL DEL DEL e l i TAB C-g ESC w 
C-x b * s c TAB RET C-e C-n C-n RET ( m a c r o e x 
p a n d SPC ' C-y ) RET C-p C-e C-x C-e ESC x e v a 
l - p r TAB RET C-p C-p C-p C-p C-p C-p ESC : f l y 
m a k e - m o d e RET q C-x b f TAB l y TAB C-g ESC 
> ( f u n DEL DEL DEL s u y m DEL DEL DEL y m b o l 
- f u n ESC TAB SPC ' f l y m a k e - m o d e ) C-x 
C-e ESC x r e p o r t - e m TAB RET

Recent messages:
Mark set
(progn (progn (defvar flymake-mode nil "Non-nil if Flymake mode is enabled.
Use the command `flymake-mode' to change this variable.") (make-variable-buffer-local (quote flymake-mode))) (defun flymake-mode (&optional arg) "Minor mode to do on-the-fly syntax checking.
When called interactively, toggles the minor mode.
With arg, turn Flymake mode on if and only if arg is positive." (interactive (list ...)) (let (...) (setq flymake-mode ...) (cond ... ...) (run-hooks ... ...) (if ... ...)) (force-mode-line-update) flymake-mode) :autoload-end nil (add-minor-mode (quote flymake-mode) (quote flymake-mode-line) (if (boundp ...) flymake-mode-map)))
Entering debugger...
Back to top level.
Making completion list...
Quit
Mark set
(autoload "flymake" 1040217 t nil)

Load-path shadows:
/usr/share/emacs23/site-lisp/prolog-el/prolog hides /usr/share/emacs/site-lisp/prolog-el/prolog
/home/rpg/emacs-packages/org-mode/contrib/lisp/htmlize hides /usr/share/emacs23/site-lisp/emacs-goodies-el/htmlize
/usr/share/emacs23/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode
/usr/share/emacs/23.4/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/23.4/site-lisp/crypt++ hides /usr/share/emacs/site-lisp/crypt++
/usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/23.4/lisp/tempo
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/css-mode/css-mode hides /usr/share/emacs/23.4/lisp/textmodes/css-mode
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell
/usr/share/emacs23/site-lisp/prolog-el/prolog hides /usr/share/emacs/23.4/lisp/progmodes/prolog
/home/rpg/emacs-packages/org-mode/lisp/org-datetree hides /usr/share/emacs/23.4/lisp/org/org-datetree
/home/rpg/emacs-packages/org-mode/lisp/org-indent hides /usr/share/emacs/23.4/lisp/org/org-indent
/home/rpg/emacs-packages/org-mode/contrib/lisp/org-wl hides /usr/share/emacs/23.4/lisp/org/org-wl
/home/rpg/emacs-packages/org-mode/lisp/org-habit hides /usr/share/emacs/23.4/lisp/org/org-habit
/home/rpg/emacs-packages/org-mode/lisp/org-agenda hides /usr/share/emacs/23.4/lisp/org/org-agenda
/home/rpg/emacs-packages/org-mode/lisp/org-mouse hides /usr/share/emacs/23.4/lisp/org/org-mouse
/home/rpg/emacs-packages/org-mode/lisp/org-plot hides /usr/share/emacs/23.4/lisp/org/org-plot
/home/rpg/emacs-packages/org-mode/lisp/org-bibtex hides /usr/share/emacs/23.4/lisp/org/org-bibtex
/home/rpg/emacs-packages/org-mode/lisp/org-faces hides /usr/share/emacs/23.4/lisp/org/org-faces
/home/rpg/emacs-packages/org-mode/lisp/org-install hides /usr/share/emacs/23.4/lisp/org/org-install
/home/rpg/emacs-packages/org-mode/contrib/lisp/org-mew hides /usr/share/emacs/23.4/lisp/org/org-mew
/home/rpg/emacs-packages/org-mode/lisp/org-rmail hides /usr/share/emacs/23.4/lisp/org/org-rmail
/home/rpg/emacs-packages/org-mode/lisp/org-src hides /usr/share/emacs/23.4/lisp/org/org-src
/home/rpg/emacs-packages/org-mode/lisp/org-mobile hides /usr/share/emacs/23.4/lisp/org/org-mobile
/home/rpg/emacs-packages/org-mode/contrib/lisp/org-vm hides /usr/share/emacs/23.4/lisp/org/org-vm
/home/rpg/emacs-packages/org-mode/lisp/org-attach hides /usr/share/emacs/23.4/lisp/org/org-attach
/home/rpg/emacs-packages/org-mode/lisp/org-archive hides /usr/share/emacs/23.4/lisp/org/org-archive
/home/rpg/emacs-packages/org-mode/lisp/org-protocol hides /usr/share/emacs/23.4/lisp/org/org-protocol
/home/rpg/emacs-packages/org-mode/lisp/org-clock hides /usr/share/emacs/23.4/lisp/org/org-clock
/home/rpg/emacs-packages/org-mode/lisp/org-info hides /usr/share/emacs/23.4/lisp/org/org-info
/home/rpg/emacs-packages/org-mode/lisp/org-colview hides /usr/share/emacs/23.4/lisp/org/org-colview
/home/rpg/emacs-packages/org-mode/lisp/org-irc hides /usr/share/emacs/23.4/lisp/org/org-irc
/home/rpg/emacs-packages/org-mode/lisp/org-footnote hides /usr/share/emacs/23.4/lisp/org/org-footnote
/home/rpg/emacs-packages/org-mode/lisp/org-w3m hides /usr/share/emacs/23.4/lisp/org/org-w3m
/home/rpg/emacs-packages/org-mode/lisp/org-compat hides /usr/share/emacs/23.4/lisp/org/org-compat
/home/rpg/emacs-packages/org-mode/lisp/org-table hides /usr/share/emacs/23.4/lisp/org/org-table
/home/rpg/emacs-packages/org-mode/lisp/org hides /usr/share/emacs/23.4/lisp/org/org
/home/rpg/emacs-packages/org-mode/lisp/org-feed hides /usr/share/emacs/23.4/lisp/org/org-feed
/home/rpg/emacs-packages/org-mode/lisp/org-bbdb hides /usr/share/emacs/23.4/lisp/org/org-bbdb
/home/rpg/emacs-packages/org-mode/lisp/org-macs hides /usr/share/emacs/23.4/lisp/org/org-macs
/home/rpg/emacs-packages/org-mode/lisp/org-gnus hides /usr/share/emacs/23.4/lisp/org/org-gnus
/home/rpg/emacs-packages/org-mode/lisp/org-timer hides /usr/share/emacs/23.4/lisp/org/org-timer
/home/rpg/emacs-packages/org-mode/lisp/org-list hides /usr/share/emacs/23.4/lisp/org/org-list
/home/rpg/emacs-packages/org-mode/lisp/org-inlinetask hides /usr/share/emacs/23.4/lisp/org/org-inlinetask
/home/rpg/emacs-packages/org-mode/lisp/org-crypt hides /usr/share/emacs/23.4/lisp/org/org-crypt
/home/rpg/emacs-packages/org-mode/lisp/org-id hides /usr/share/emacs/23.4/lisp/org/org-id
/home/rpg/emacs-packages/org-mode/lisp/org-mhe hides /usr/share/emacs/23.4/lisp/org/org-mhe
/usr/share/emacs23/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview
/usr/share/emacs23/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs23/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs23/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs23/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs23/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs23/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs23/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs23/site-lisp/auctex/tex-fptex hides /usr/share/emacs/site-lisp/auctex/tex-fptex
/usr/share/emacs23/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs
/usr/share/emacs23/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs23/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs23/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs23/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs23/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs23/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs23/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs23/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs23/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs23/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs23/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs23/site-lisp/html-helper-mode/html-helper-mode hides /usr/share/emacs/site-lisp/html-helper-mode/html-helper-mode
/usr/share/emacs23/site-lisp/html-helper-mode/visual-basic-mode hides /usr/share/emacs/site-lisp/html-helper-mode/visual-basic-mode
/usr/share/emacs23/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/site-lisp/html-helper-mode/tempo
/usr/share/emacs23/site-lisp/html-helper-mode/hhm-config hides /usr/share/emacs/site-lisp/html-helper-mode/hhm-config

Features:
(shadow sort mail-extr emacsbug vc-cvs vc-rcs vc-dir ewoc pcmpl-unix
log-edit pcvs-util add-log diff-mode etags cdlatex-autoloads texmathp
parse-time timezone ob-sh ob-perl reftex-vcr reftex-dcr reftex
reftex-vars org-element org-rmail org-mhe org-irc org-info org-gnus
org-docview doc-view image-mode org-bibtex bibtex org-bbdb org-w3m
dired-aux jka-compr debug cus-edit cus-start cus-load dired newcomment
fic-mode ansi-color em-unix em-term term disp-table ehelp electric
em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic esh-opt em-banner em-alias esh-var esh-io esh-cmd esh-ext
esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util
insert-date-stamp stardate string imenu csharp-mode
csharp-mode-autoloads cc-langs cc-mode cc-fonts cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs compile lisp-mnt help-mode
view multi-isearch finder-inf url-http tls url-gw url-auth vc-svn
google-contacts xml url-cache url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-util url-parse url-vars
google-oauth package generic uniquify org-protocol org-depend org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline org-fixup autoload ob-emacs-lisp ob
ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint
ob-core ob-eval org-compat org-macs find-func cal-menu calendar
cal-loaddefs gnus-sum nnoo gnus-group gnus-undo nnmail mail-source
gnus-start gnus-spec gnus-int gnus-range message sendmail ecomplete
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev gmm-utils mailheader
canlock sha1 hex-util hashcash gnus-win gnus gnus-ems nnheader
mail-utils mm-util mail-prsvr vc vc-dispatcher server completion tempo
slime-indentation slime-tramp tramp-imap assoc tramp-gw tramp-fish
tramp-smb tramp-cache tramp-ftp tramp-cmds tramp auth-source gnus-util
netrc time-date shell password-cache format-spec tramp-compat trampver
slime-asdf warnings slime-fancy slime-fontifying-fu slime-package-fu
slime-references slime-scratch slime-presentations slime-fuzzy
slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc advice advice-preload slime-parse
slime-repl recentf tree-widget wid-edit slime byte-opt bytecomp
byte-compile regexp-opt derived help-fns easymenu pp comint ring
hyperspec thingatpt browse-url edmacro kmacro cl cl-19 emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode crypt crypt++
crypt+pgp-pub preview-latex tex-site auto-loads tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind system-font-setting font-render-setting
gtk x-toolkit x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16290; Package emacs. (Mon, 30 Dec 2013 01:11:01 GMT) Full text and rfc822 format available.

Message #8 received at 16290 <at> debbugs.gnu.org (full text, mbox):

From: Robert Goldman <rpgoldman <at> sift.net>
To: 16290 <at> debbugs.gnu.org
Subject: Possible patch for this bug
Date: Sun, 29 Dec 2013 15:51:40 -0600
I believe if we change the definition of is-flymake-enabled to the
following:

  (let ((is-flymake-enabled
         (and (fboundp 'flymake-mode)
--->          (functionp (symbol-function 'flymake-mode))
              flymake-mode)))

then we don't get the false positive when flymake-mode is an unforced
autoload.

Sorry if this isn't the right forum; I didn't know how to report this
directly to the mode's maintainers.

R




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16290; Package emacs. (Mon, 30 Dec 2013 01:18:03 GMT) Full text and rfc822 format available.

Message #11 received at 16290 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: rpgoldman <at> sift.net
Cc: 16290 <at> debbugs.gnu.org
Subject: Re: bug#16290: Possible patch for this bug
Date: Sun, 29 Dec 2013 20:17:43 -0500
Robert Goldman wrote:

> Sorry if this isn't the right forum; I didn't know how to report this
> directly to the mode's maintainers.

Assuming you are talking about
http://www.emacswiki.org/emacs/csharp-mode.el
the maintainer address is listed in the standard header.

Since this file is not part of Emacs I will close this report.




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 30 Dec 2013 01:18:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 16290 <at> debbugs.gnu.org and rpgoldman <at> sift.info (Robert P. Goldman) Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 30 Dec 2013 01:18:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Jan 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.