unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* About `name' in loadup.el
@ 2013-03-10  0:11 Xue Fuqiao
  2013-03-10  0:44 ` Pascal J. Bourguignon
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Xue Fuqiao @ 2013-03-10  0:11 UTC (permalink / raw)
  To: help-gnu-emacs

In lisp/loadup.el:

  (let ((name (concat "emacs-" emacs-version)))
    (while (string-match "[^-+_.a-zA-Z0-9]+" name)
      (setq name (concat (downcase (substring name 0 (match-beginning 0)))
  		       "-"
  		       (substring name (match-end 0)))))
    (message "Adding name %s" name)
    (add-name-to-file "emacs" name t))

I'm confused here.  What does this fragment of code do?  And when will
characters other than "-+_.a-zA-Z0-9" be in `emacs-version'?  Can
anybody help?  Thanks.

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: About `name' in loadup.el
@ 2013-03-10  6:38 Xue Fuqiao
  2013-03-10  6:49 ` Jambunathan K
  0 siblings, 1 reply; 12+ messages in thread
From: Xue Fuqiao @ 2013-03-10  6:38 UTC (permalink / raw)
  To: help-gnu-emacs

> > In lisp/loadup.el:
> > 
> >   (let ((name (concat "emacs-" emacs-version)))
> >     (while (string-match "[^-+_.a-zA-Z0-9]+" name)
> >       (setq name (concat (downcase (substring name 0 (match-beginning 0)))
> >   		       "-"
> >   		       (substring name (match-end 0)))))
> >     (message "Adding name %s" name)
> >     (add-name-to-file "emacs" name t))
> > 
> > What does this fragment of code do?

> It creates a hard link emacs-XX.YY.ZZ -> emacs.

Thanks.

> > And when will characters other than "-+_.a-zA-Z0-9" be in
> > `emacs-version'?
> 
> It's a 'while', not an 'if'.

Can you explain it more detailed?  Do you mean `emacs-version' won't
contain "-+_.a-zA-Z0-9"?

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



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

end of thread, other threads:[~2013-03-13 11:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-10  0:11 About `name' in loadup.el Xue Fuqiao
2013-03-10  0:44 ` Pascal J. Bourguignon
2013-03-10  3:51 ` Eli Zaretskii
2013-03-10 11:27 ` Thien-Thi Nguyen
2013-03-10 13:02   ` Xue Fuqiao
2013-03-13 10:35     ` Thien-Thi Nguyen
2013-03-13 11:10       ` Xue Fuqiao
  -- strict thread matches above, loose matches on Subject: below --
2013-03-10  6:38 Xue Fuqiao
2013-03-10  6:49 ` Jambunathan K
2013-03-10  7:07   ` Xue Fuqiao
2013-03-10 20:00     ` Andy Moreton
2013-03-10 22:37       ` Xue Fuqiao

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).