unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Can't compile
@ 2007-02-24 10:28 Xavier Maillard
  2007-02-24 22:49 ` Peter Dyballa
  0 siblings, 1 reply; 16+ messages in thread
From: Xavier Maillard @ 2007-02-24 10:28 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I am trying to byte-compile nero.el[1] but it just fails with
this error:

In nero-restore-match:
nero.el:1526:17:Warning: `string-to-int' is an obsolete function (as of Emacs
    22.1); use `string-to-number' instead.
nero.el:2119:1:Error: Symbol's function definition is void: nero-follow-numbers
make: *** [nero.elc] Error 1

The first warning is easy to fix (and I fixed it) but what about
the second error ?

nero-follow-numbers is a (defined) function used in a macro.

Here is the defun:

(defun nero-follow-numbers (lis handler)
  "Used by `nero-defjump' to add a nested list of actions.
Each action corresponds to following a given numbered link in LIS.
The last link in the list is followed using HANDLER."
  (let (ret)
    (nero-recursively-add-number-actions (reverse lis) handler ret)))

And the macro:

(defmacro nero-defjump (name baseurl 
                             &optional handler run-after-load 
                             &rest numbers)
  "Create a jump to be used with nero.
Nero jumps are like bookmarks or \"webjumps\", but they can
do a bit more.  The most basic nero jump is essentially just
a bookmark.

The reason you might want more is that sometimes urls change, you
know a consistent way to find them, starting from some
\"landmark\".  You don't want to redefine your bookmark every
time the url changes, but you don't want to physically go through
the process of browsing to the final url either.  What to do?
This macro takes the approach of having nero do the browsing for
you.

NAME is how you might refer to this jump in prose.  BASEURL
is the URL to start from. NUMBERS, if present, indicate the
numbered links to follow, in order.

A function called \"nero-jump-to-\" NAME (suitably marked up)
will be created when this macro runs.

HANDLER can be used to specify alternative instructions on how to
load the final page accessed by the jump.  For one example,
see `nero-oddmuse-recent-changes-handler'."
  (declare (indent defun))
  `(add-to-list 
    'nero-jumps
    (cons ,name 
          (defun ,(intern
                   (concat "nero-jump-to-"
                           (downcase
                            (replace-regexp-in-string
                             " " "-" name))))
            (&optional insert)
            (interactive "P")
            (if insert
                (insert ,baseurl)
              (nero-browse-url 
               ,baseurl
               nil
               ;; this is last,
               ;; use the handler 
               (unless 
                   ,(car numbers)
                 ,handler)
               nil 
               ;; the action we take once the page has loaded
               ;; (typically involves following numbered links)
               ,(nero-follow-numbers numbers handler)
               ;; the first page is not the last page; be ephemeral
               (when ,(car numbers) t)
               ;; maybe revise, otherwise, add.
               (when ,(equal (nero-current-url) baseurl) t)))))))

I can not find a way to "silent" the byte-compiler. Can you help
?

Thank you

Footnotes: 
[1]  http://www.ma.utexas.edu/~jcorneli/a/elisp/nero.el

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

end of thread, other threads:[~2007-02-28 11:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.59.1172342304.7795.help-gnu-emacs@gnu.org>
2007-02-25 18:36 ` Can't compile Joost Kremers
2007-02-25 18:47   ` Xavier Maillard
     [not found]   ` <mailman.94.1172429426.7795.help-gnu-emacs@gnu.org>
2007-02-25 19:13     ` Joost Kremers
2007-02-26  5:20       ` Xavier Maillard
2007-02-26 11:24 ` Robert Thorpe
2007-02-26 18:31   ` Xavier Maillard
     [not found]   ` <mailman.124.1172514850.7795.help-gnu-emacs@gnu.org>
2007-02-26 18:46     ` Robert Thorpe
2007-02-26 20:26       ` Xavier Maillard
2007-02-28  3:16   ` Kevin Rodgers
2007-02-28 11:28     ` Xavier Maillard
     [not found]   ` <mailman.208.1172632616.7795.help-gnu-emacs@gnu.org>
2007-02-28 11:08     ` Robert Thorpe
2007-02-24 10:28 Xavier Maillard
2007-02-24 22:49 ` Peter Dyballa
2007-02-25  8:08   ` Xavier Maillard
2007-02-25 11:54     ` Peter Dyballa
2007-02-25 12:58       ` Xavier Maillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).