diff options
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/ChangeLog | 14 | ||||
| -rw-r--r-- | admin/admin.el | 22 | ||||
| -rw-r--r-- | admin/notes/nextstep | 159 | ||||
| -rwxr-xr-x | admin/quick-install-emacs | 4 |
4 files changed, 177 insertions, 22 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index d3bc51bd9f6..6d114eae003 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2010-10-12 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * notes/nextstep: Move here from ../nextstep/DEV-NOTES. | ||
| 4 | |||
| 5 | 2010-10-09 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * admin.el (set-version): Add doc/emacs/emacsver.texi. | ||
| 8 | |||
| 9 | 2010-10-09 Glenn Morris <rgm@gnu.org> | ||
| 10 | |||
| 11 | * admin.el (set-version): No need to act on doc/ files any more. | ||
| 12 | |||
| 13 | * quick-install-emacs (PUBLIC_LIBSRC_BINARIES): Remove b2m. | ||
| 14 | |||
| 1 | 2010-09-05 Juanma Barranquero <lekktu@gmail.com> | 15 | 2010-09-05 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 16 | ||
| 3 | * unidata/BidiMirroring.txt: Update from | 17 | * unidata/BidiMirroring.txt: Update from |
diff --git a/admin/admin.el b/admin/admin.el index 51bbecf4c57..7cd2c02fb58 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; admin.el --- utilities for Emacs administration | 1 | ;;; admin.el --- utilities for Emacs administration |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2010 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; This file is part of GNU Emacs. | 6 | ;; This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -70,28 +70,13 @@ Root must be the root of an Emacs source tree." | |||
| 70 | (rx (and "AC_INIT" (1+ (not (in ?,))) | 70 | (rx (and "AC_INIT" (1+ (not (in ?,))) |
| 71 | ?, (0+ space) | 71 | ?, (0+ space) |
| 72 | (submatch (1+ (in "0-9.")))))) | 72 | (submatch (1+ (in "0-9.")))))) |
| 73 | (set-version-in-file root "doc/emacs/emacs.texi" version | 73 | (set-version-in-file root "doc/emacs/emacsver.texi" version |
| 74 | (rx (and "EMACSVER" (1+ space) | 74 | (rx (and "EMACSVER" (1+ space) |
| 75 | (submatch (1+ (in "0-9.")))))) | 75 | (submatch (1+ (in "0-9.")))))) |
| 76 | (set-version-in-file root "doc/lispref/elisp.texi" version | ||
| 77 | (rx (and "EMACSVER" (1+ space) | ||
| 78 | (submatch (1+ (in "0-9.")))))) | ||
| 79 | (set-version-in-file root "doc/lispref/vol1.texi" version | ||
| 80 | (rx (and "EMACSVER" (1+ space) | ||
| 81 | (submatch (1+ (in "0-9.")))))) | ||
| 82 | (set-version-in-file root "doc/lispref/vol2.texi" version | ||
| 83 | (rx (and "EMACSVER" (1+ space) | ||
| 84 | (submatch (1+ (in "0-9.")))))) | ||
| 85 | (set-version-in-file root "doc/lispref/book-spine.texinfo" version | ||
| 86 | (rx (and "Emacs Version" (1+ space) | ||
| 87 | (submatch (1+ (in "0-9.")))))) | ||
| 88 | (set-version-in-file root "doc/man/emacs.1" version | 76 | (set-version-in-file root "doc/man/emacs.1" version |
| 89 | (rx (and ".TH EMACS" (1+ not-newline) | 77 | (rx (and ".TH EMACS" (1+ not-newline) |
| 90 | "GNU Emacs" (1+ space) | 78 | "GNU Emacs" (1+ space) |
| 91 | (submatch (1+ (in "0-9.")))))) | 79 | (submatch (1+ (in "0-9.")))))) |
| 92 | (set-version-in-file root "doc/misc/faq.texi" version | ||
| 93 | (rx (and "VER" (1+ space) | ||
| 94 | (submatch (1+ (in "0-9.")))))) | ||
| 95 | (set-version-in-file root "lib-src/makefile.w32-in" version | 80 | (set-version-in-file root "lib-src/makefile.w32-in" version |
| 96 | (rx (and "VERSION" (0+ space) "=" (0+ space) | 81 | (rx (and "VERSION" (0+ space) "=" (0+ space) |
| 97 | (submatch (1+ (in "0-9.")))))) | 82 | (submatch (1+ (in "0-9.")))))) |
| @@ -218,5 +203,4 @@ Root must be the root of an Emacs source tree." | |||
| 218 | 203 | ||
| 219 | (provide 'admin) | 204 | (provide 'admin) |
| 220 | 205 | ||
| 221 | ;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5 | ||
| 222 | ;;; admin.el ends here | 206 | ;;; admin.el ends here |
diff --git a/admin/notes/nextstep b/admin/notes/nextstep new file mode 100644 index 00000000000..462101f9abf --- /dev/null +++ b/admin/notes/nextstep | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | This file summarizes primary aspects of the NS port architecture. If | ||
| 2 | possible, it should be updated for changes. | ||
| 3 | |||
| 4 | Currently it summarizes the state as of: | ||
| 5 | |||
| 6 | summer 2008 shortly after merging to trunk | ||
| 7 | |||
| 8 | |||
| 9 | |||
| 10 | Startup | ||
| 11 | ------- | ||
| 12 | |||
| 13 | Init sequence: | ||
| 14 | emacs.c: ns_alloc_autorelease_pool() nsterm.m | ||
| 15 | emacs.c: ns_init_paths() nsterm.m | ||
| 16 | - override EMACSLOADPATH, etc. so resources can be found in-bundle | ||
| 17 | emacs.c: init_display() dispnew.c | ||
| 18 | - sets Vwindow_system (window-system) to 'ns | ||
| 19 | emacs.c: loadup.el -> startup.el -> ns-initialize-window-system | ||
| 20 | -> x-open-connection (nsfns.m) | ||
| 21 | - ns-list-services | ||
| 22 | -> nsterm.m: ns_term_init() | ||
| 23 | - EmacsApp sharedApplication | ||
| 24 | - read NS defaults (org.gnu.Emacs.plist) | ||
| 25 | - init X-style color list | ||
| 26 | - ns_create_terminal() | ||
| 27 | - NSApp run (goes to applicationDidFinishLaunching which terminates | ||
| 28 | event loop -- see below) | ||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | Event Loop | ||
| 33 | ---------- | ||
| 34 | |||
| 35 | In an NS application, the event loop is normally managed by system and all | ||
| 36 | user code is event-driven. [NSApp run] is called by user and never returns. | ||
| 37 | |||
| 38 | In Emacs, the event loop is managed by emacs itself. | ||
| 39 | |||
| 40 | The NS port mediates between these two styles by intercepting the NS event | ||
| 41 | dispatch at [NSApp sendEvent]. If a special event is detected, the event loop | ||
| 42 | is broken, and control returned to Emacs. This special event is sent by | ||
| 43 | ns_send_appdefined, which is called under these circumstances: | ||
| 44 | |||
| 45 | - if a user input event is received | ||
| 46 | - when a timeout fires | ||
| 47 | |||
| 48 | NS event processing is instigated from Emacs through ns_select() and | ||
| 49 | ns_read_socket() in nsterm.m. Parts of the codepaths leading to these | ||
| 50 | functions are: | ||
| 51 | |||
| 52 | |||
| 53 | keyboard.c:read_avail_input() | ||
| 54 | -> ns_read_socket (ns_send_appdefined) -> [NSApp run] | ||
| 55 | |||
| 56 | process.c:wait_reading_process_output() | ||
| 57 | -> ns_select -> gobble_input (global inNsSelect=1) | ||
| 58 | -> ns_read_socket (ns_send_appdefined if !expected) -> [NSApp run] | ||
| 59 | |||
| 60 | sysdep.c:sys_select() -> read_input_waiting() | ||
| 61 | -> ns_read_socket (send_appdefined) -> [NSApp run] | ||
| 62 | [this codepath may not be used] | ||
| 63 | |||
| 64 | |||
| 65 | Currently ctrl-g is not detected in as many circumstances as other emacsen. | ||
| 66 | It is not certain whether this is due to the means of event loop integration, | ||
| 67 | or errors of omission in the NS code. This is an area for improvement. | ||
| 68 | Also, see the article here and its containing thread: | ||
| 69 | |||
| 70 | http://article.gmane.org/gmane.emacs.devel/92021/match=handling%5fsignal | ||
| 71 | |||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | Text Rendering and Font Handling | ||
| 76 | -------------------------------- | ||
| 77 | |||
| 78 | nsfont.m implements the font driver, responsible for managing fonts and | ||
| 79 | rendering text. Fonts are obtained through NSFontManager. Rendering must be | ||
| 80 | done at a low level due to emacs' fine control over this process, therefore | ||
| 81 | there are different approachs under Cocoa and GNUstep. Under GNUstep, the | ||
| 82 | original NeXT Display PostScript (DPS) APIs are available and used. Under | ||
| 83 | Cocoa, these were removed and Quartz drawing functions replaced them. | ||
| 84 | |||
| 85 | In both cases, font glyphs are accessed through UTF8 character | ||
| 86 | representations. It would be preferable to use unicode indices, but prior | ||
| 87 | attempts at this have failed. | ||
| 88 | |||
| 89 | Multi-script fontsets are auto-created in nsfont_make_fontset_for_font() using | ||
| 90 | the facilities of NSTextStorage and NSLayoutManager. | ||
| 91 | |||
| 92 | |||
| 93 | Object Architecture | ||
| 94 | ------------------- | ||
| 95 | |||
| 96 | Unlike the other GUIs, the NS interface is based on a high-level and | ||
| 97 | object-oriented API. This creates some tension in the code because emacs | ||
| 98 | itself has been architected around the low-level Xlib and Xt APIs. The NS | ||
| 99 | port tries to strike a balance between simplifying code on its side using OO | ||
| 100 | features, and keeping code as similar as possible to other ports to ease | ||
| 101 | maintenance. The following are the main classes (see nsterm.h): | ||
| 102 | |||
| 103 | EmacsApp : NSApplication | ||
| 104 | - event loop integration, interapp comms point for Finder (NSWorkspace) msgs, | ||
| 105 | Services | ||
| 106 | - one global instance (NSApp) | ||
| 107 | - nsterm.m | ||
| 108 | |||
| 109 | EmacsView : NSView <TextInput> | ||
| 110 | - handles rendering of text and fringe, interapp comms for drag/drop | ||
| 111 | - instance for each frame | ||
| 112 | - child of window's content view | ||
| 113 | - nsterm.m | ||
| 114 | |||
| 115 | EmacsWindow : NSWindow | ||
| 116 | - utility override for resize handling | ||
| 117 | |||
| 118 | EmacsScroller : NSScroller | ||
| 119 | - instance for each emacs window, renders scrollbar | ||
| 120 | - child of window's content view | ||
| 121 | - nsterm.m | ||
| 122 | |||
| 123 | EmacsImage : NSImage | ||
| 124 | - image rendering, toolbar icons, stippling, fringe bitmaps | ||
| 125 | - instance for each image | ||
| 126 | - nsimage.m | ||
| 127 | |||
| 128 | EmacsMenu : NSMenu | ||
| 129 | - menu management | ||
| 130 | - one tree of instances for menubar, one instance for each popup menu | ||
| 131 | - nsmenu.m | ||
| 132 | |||
| 133 | EmacsToolbar : NSToolbar | ||
| 134 | - toolbar management, one instance for each frame | ||
| 135 | - nsmenu.m | ||
| 136 | |||
| 137 | |||
| 138 | EmacsDialogPanel : NSPanel | ||
| 139 | - popup dialogs, one instance for each | ||
| 140 | - nsmenu.m | ||
| 141 | |||
| 142 | EmacsTooltip : NSObject | ||
| 143 | - tooltip popups, one instance for each | ||
| 144 | - nsmenu.m | ||
| 145 | |||
| 146 | EmacsGlyphStorage : NSObject <NSGlyphStorage> | ||
| 147 | - utility for text rendering | ||
| 148 | - nsfont.m | ||
| 149 | |||
| 150 | EmacsPrefsController : NSObject | ||
| 151 | - utility for preferences panel management, one global instance | ||
| 152 | - nsterm.m | ||
| 153 | - nextstep/Cocoa/Emacs.base/Contents/Resources/preferences.nib | ||
| 154 | - nextstep/GNUstep/Emacs.base/Resources/preferences.gorm | ||
| 155 | |||
| 156 | EmacsSavePanel : NSSavePanel | ||
| 157 | EmacsOpenPanel : NSOpenPanel | ||
| 158 | - utility override for panel notifications | ||
| 159 | |||
diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs index 39b200b5102..24972e655b6 100755 --- a/admin/quick-install-emacs +++ b/admin/quick-install-emacs | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ## install emacs very often. See the --help output for more details. | 28 | ## install emacs very often. See the --help output for more details. |
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse' | 31 | PUBLIC_LIBSRC_BINARIES='emacsclient etags ctags ebrowse' |
| 32 | PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' | 32 | PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' |
| 33 | 33 | ||
| 34 | AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" | 34 | AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" |
| @@ -374,5 +374,3 @@ END { | |||
| 374 | done | 374 | done |
| 375 | 375 | ||
| 376 | ) | eval $EXEC | 376 | ) | eval $EXEC |
| 377 | |||
| 378 | # arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477 | ||