From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: observations for ns*.m files (Re: Emacs.app merged) Date: Sun, 27 Jul 2008 15:18:18 -0700 Message-ID: <200807272218.m6RMIIGA007577@sallyv1.ics.uci.edu> References: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217197284 27388 80.91.229.12 (27 Jul 2008 22:21:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Jul 2008 22:21:24 +0000 (UTC) Cc: emacs- devel To: Adrian Robert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 28 00:22:13 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KNEcz-0002J0-4r for ged-emacs-devel@m.gmane.org; Mon, 28 Jul 2008 00:22:09 +0200 Original-Received: from localhost ([127.0.0.1]:43729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNEc5-0001hU-19 for ged-emacs-devel@m.gmane.org; Sun, 27 Jul 2008 18:21:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNEc0-0001hD-8Z for emacs-devel@gnu.org; Sun, 27 Jul 2008 18:21:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNEbz-0001h1-My for emacs-devel@gnu.org; Sun, 27 Jul 2008 18:21:07 -0400 Original-Received: from [199.232.76.173] (port=46718 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNEbz-0001gy-HL for emacs-devel@gnu.org; Sun, 27 Jul 2008 18:21:07 -0400 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]:38277) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KNEbz-0001Ns-2U for emacs-devel@gnu.org; Sun, 27 Jul 2008 18:21:07 -0400 X-ICS-MailScanner-Watermark: 1217801900.90858@uD0udFIAnFKvqh7J33vo7Q Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m6RMIIGA007577; Sun, 27 Jul 2008 15:18:18 -0700 (PDT) In-Reply-To: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> (Adrian Robert's message of "Tue, 15 Jul 2008 14:47:21 -0400") Original-Lines: 133 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.437, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FM_MULTI_ODD2 1.10, FM_MULTI_ODD3 0.70, TW_FN 0.08) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101605 Archived-At: Here are some observations for the code in the syms_of_* ns*.m files. Can you please address these? void syms_of_nsfns () { int i; Qns_frame_parameter = intern ("ns-frame-parameter"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This seems unused, better get rid of it. Qbuffered = intern ("bufferd"); Did this ever work given the typo? Is it something that people would care enough about to have an option? 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? DEFVAR_LISP ("ns-icon-type-alist", &Vns_icon_type_alist, doc: /* Alist of elements (REGEXP . IMAGE) for images of icons associated to frames. If the title of a frame matches REGEXP, then IMAGE.tiff is selected as the image of the icon representing the frame when it's miniaturized. If an element is t, then Emacs tries to select an icon based on the filetype of the visited file. The images have to be installed in a folder called English.lproj in the Emacs folder. You have to restart Emacs after installing new icons. Example: Install an icon Gnus.tiff and execute the following code (setq ns-icon-type-alist (append ns-icon-type-alist '((\"^\\\\*\\\\(Group\\\\*$\\\\|Summary \\\\|Article\\\\*$\\\\)\" [snip] This looks like a generic thing, better not make it platform specific. Is there a problem with the normal way of specifying icons? void syms_of_nsselect (void) { /* 23: { */ DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, doc: /* Coding system for communicating with other programs. When sending or receiving text via cut_buffer, selection, and clipboard, the text is encoded or decoded by this coding system. The default value is determined by the system script code. */); Vselection_coding_system = Qnil; DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, doc: /* Coding system for the next communication with other programs. Usually, `selection-coding-system' is used for communicating with other programs. But, if this variable is set, it is used for the next communication only. After the communication, this variable is set to nil. */); Vnext_selection_coding_system = Qnil; These were removed from the X code: 2008-02-01 Kenichi Handa * xselect.c (Vselection_coding_system) (Vnext_selection_coding_system): Delete them. are they still needed for ns? 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? 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? DEFVAR_LISP ("ns-cursor-blink-rate", &ns_cursor_blink_rate, "Rate at which the Emacs cursor blinks (in seconds).\n\ Set to nil to disable blinking."); Can't blink-cursor-rate be used? (IMHO blink-cursor-mode should be off by default anyway, but that's a completely different topic). 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. 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? 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? Thanks --dan