unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Robert <adrian.b.robert@gmail.com>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs- devel <emacs-devel@gnu.org>
Subject: Re: observations for ns*.m files (Re: Emacs.app merged)
Date: Sun, 27 Jul 2008 21:54:50 -0400	[thread overview]
Message-ID: <16EE24C1-291C-4148-90F2-C249F612EFB2@gmail.com> (raw)
In-Reply-To: <200807272218.m6RMIIGA007577@sallyv1.ics.uci.edu>

[-- Attachment #1: Type: text/plain, Size: 6054 bytes --]

On Jul 27, 2008, at 4:12 PM, Dan Nicolaescu wrote:

> I noticed that this function in frame.el does not have a check for ns,
> shouldn't it?
>
> (defun face-set-after-frame-default (frame &optional parameters)
>  "Initialize the frame-local faces of FRAME.

Yes, thanks, added.  Note, most of these window-system checks  
throughout the lisp code simply check for every window system (x, w32,  
ns, and formerly, mac).  It might be good at some point to change all  
these to simply check whether a window system is being used.


> "x-create-frame" does not do a copy_alist at the beginning like the
> other ports to.  On Windows not having that resulted in some strange
> behavior.  It might be a good idea to sync that function with the X
> version again.

OK.


> What is the #ifdef HAVE_NS code in frame.c:x_get_frame used for?
> ...
>                                 if (!strcmp (SDATA (lower), "on")
> #ifdef HAVE_NS
>                    || !strcmp(SDATA(lower), "yes")
> #endif
>                    || !strcmp (SDATA (lower), "true"))
> ...
> Is "yes" and "no" something that some other program on the system can
> write? Or something that the user would write?  If the latter, then
> wouldn't it be better to just teach the users to use the values all
> other systems uses and avoid complications in code and docs?

"YES" and "NO" are the standard boolean values used in the NS defaults  
system.  A property list editor or a user could write them.  As far as  
teaching users, I would hope that the purpose of application software  
is to adapt computers to users rather than the other way around!  ;)


On Jul 27, 2008, at 6:18 PM, Dan Nicolaescu wrote:

> void
> syms_of_nsfns ()
>  ...
>  Qns_frame_parameter = intern ("ns-frame-parameter");
>  		      	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This seems unused, better get rid of it.

Done.



>  Qbuffered = intern ("bufferd");
>
> Did this ever work given the typo?  Is it something that people would
> care enough about to have an option?

I think it's just something I copied from an earlier version of x- 
create-frame in some other term.  I've replaced it with alpha.



>  Qfontsize = intern ("fontsize");
>  staticpro (&Qfontsize);
>
> This seems a generic facility, should it be here?  Can't the generic
> way of specifying fonts work on this platform too?

I'm not sure if there is a generic facility.  On X, font size is part  
of the XLFD strings.  These are not used except where absolutely  
necessary on NS, and I would like to get rid of these cases.



>  DEFVAR_LISP ("ns-icon-type-alist", &Vns_icon_type_alist,
>               doc: /* Alist of elements (REGEXP . IMAGE) for images  
> of icons associated to frames.
> ...
> This looks like a generic thing, better not make it platform
> specific.  Is there a problem with the normal way of specifying icons?

What is the normal way?  I think this facility in the NS port probably  
dates from before emacs itself had this feature, so certainly we  
should try to use the generic code now.



> void
> syms_of_nsselect (void)
> {
>
> /* 23: { */
>  DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
> ...
> DEFVAR_LISP ("next-selection-coding-system",  
> &Vnext_selection_coding_system,
>
> These were removed from the X code:
>
> 2008-02-01  Kenichi Handa  <handa@m17n.org>
>
> 	    * xselect.c (Vselection_coding_system)
> 	    (Vnext_selection_coding_system): Delete them.
>
> are they still needed for ns?

These were not actually used in the NS code, so I've now dropped  
them.  However note they are still present in W32 and DOS.



> void
> syms_of_nsterm ()
> {
>  DEFVAR_LISP ("ns-command-modifier", &ns_command_modifier,
>               "This variable describes the behavior of the command  
> key.\n\
> Set to control, meta, alt, super, or hyper means it is taken to be  
> that key.");
>
>  DEFVAR_LISP ("ns-control-modifier", &ns_control_modifier,
>               "This variable describes the behavior of the control  
> key.\n\
> Set to control, meta, alt, super, or hyper means it is taken to be  
> that key.");
>
> These 2 look identical, are they both needed?  Are they needed at all
> after the recent modifier changes?

On Mac keyboards, Command and Control are separate keys, so both are  
needed.  What recent modifier changes are you referring to?



>  DEFVAR_LISP ("ns-cursor-blink-mode", &ns_cursor_blink_mode,
>               "Internal variable -- use M-x blink-cursor-mode or  
> preferences\n\
> panel to control this setting.");
>
> Is this needed?  Can't the standard blink-cursor-mode be used?

That's the goal, but it's not trivial (http://thread.gmane.org/gmane.emacs.devel/101190/focus=101588 
).  Hopefully eventually.



>  DEFVAR_LISP ("ns-expand-space", &ns_expand_space,
>               "Amount by which spacing between lines is expanded  
> (positive)\n\
> or shrunk (negative).  Zero (the default) means standard line height. 
> \n\
> (This variable should only be read, never set.)");
>
> This is generic, better not make it ns specific.  Can this can be done
> in platform specific code without changes to redisplay?  It seems a
> bit strange anyway.

This might be the same as the lineSpacing frame parameter.  Can  
someone say whether it is?  ns-expand-space is as documented above, a  
way for the user to customize how close together or spread apart lines  
are vertically.  If so, we can hook up this code to that parameter.



>  DEFVAR_LISP ("ns-antialias-text", &ns_antialias_text,
>               "Non-nil (the default) means to render text  
> antialiased. Only has an effect on OS X Panther and above.");
>
> Can the generic functionality be used instead of this?

Which generic functionality?



>  DEFVAR_LISP ("ns-use-system-highlight-color",
>               &ns_use_system_highlight_color,
>               "Whether to use the system default (on OS X only) for  
> the highlight color.  Nil means to use standard emacs (prior to  
> version 21) 'grey'.");
>
> Is this the region color or something else?

Yes, the 'region' face.  I'll update the doc.



[-- Attachment #2: Type: text/html, Size: 9454 bytes --]

  reply	other threads:[~2008-07-28  1:54 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 18:47 Emacs.app merged Adrian Robert
2008-07-15 18:49 ` İsmail Dönmez
2008-07-15 19:28 ` Chong Yidong
2008-07-15 22:32 ` Thomas Christensen
2008-07-15 23:29   ` Cezar Halmagean
2008-07-16  9:25 ` a review of the merge (Re: Emacs.app merged) Dan Nicolaescu
2008-07-16 10:00   ` Jason Rumney
2008-07-16 12:17     ` Adrian Robert
2008-07-16 16:15       ` Stefan Monnier
2008-07-16 16:21   ` Stefan Monnier
2008-07-16 21:23     ` Dan Nicolaescu
2008-07-20  1:27       ` Adrian Robert
2008-07-20 11:56         ` Dan Nicolaescu
2008-07-28 13:25           ` Adrian Robert
2008-07-28 19:00             ` Dan Nicolaescu
2008-08-01 10:48               ` Adrian Robert
2008-08-01 11:09                 ` Jason Rumney
2008-08-01 12:55                   ` Dan Nicolaescu
2008-08-01 13:36                     ` Eli Zaretskii
2008-08-01 13:49                     ` Jason Rumney
2008-08-01 14:23                       ` Dan Nicolaescu
2008-08-01 14:48                         ` Adrian Robert
2008-08-01 15:07                           ` Dan Nicolaescu
2008-07-17  1:25   ` Adrian Robert
2008-07-17  3:24     ` Dan Nicolaescu
2008-07-17  4:16       ` FOR-RELEASE [was Re: a review of the merge (Re: Emacs.app merged)] Glenn Morris
2008-07-17  4:19       ` a review of the merge (Re: Emacs.app merged) Glenn Morris
2008-07-17 17:22       ` Adrian Robert
2008-07-17 18:08         ` Dan Nicolaescu
2008-07-17  3:43     ` Stefan Monnier
2008-07-17  7:33       ` David De La Harpe Golden
2008-07-17  6:55   ` Dan Nicolaescu
2008-07-16 19:26 ` Emacs.app merged Stefan Monnier
2008-07-17  1:26   ` Adrian Robert
2008-07-27 20:12 ` some missing code? (was: Re: Emacs.app merged) Dan Nicolaescu
2008-07-27 22:18 ` observations for ns*.m files (Re: " Dan Nicolaescu
2008-07-28  1:54   ` Adrian Robert [this message]
2008-07-28  2:58     ` Dan Nicolaescu
2008-07-28  4:16       ` Stefan Monnier
2008-07-28 11:00         ` Miles Bader
2008-07-28  7:15       ` Jason Rumney
2008-07-28 13:29         ` Adrian Robert
2008-07-28 13:54           ` Chong Yidong
2008-07-28 15:10           ` Jason Rumney
2008-07-28 13:28       ` Adrian Robert
2008-07-28 14:35         ` Dan Nicolaescu
2008-08-05  5:13 ` build system observations (was " Dan Nicolaescu
2008-08-06 16:25   ` Adrian Robert
2008-08-06 17:29     ` build system observations Dan Nicolaescu
2008-08-07  1:36       ` Adrian Robert
2008-09-05 15:03         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16EE24C1-291C-4148-90F2-C249F612EFB2@gmail.com \
    --to=adrian.b.robert@gmail.com \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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