aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement field numbers in format stringsPhilipp Stephani2017-06-021-8/+47
| | | | | | | | | | | | | | | A field number explicitly specifies the argument to be formatted. This is especially important for potential localization work, since grammars of various languages dictate different word orders. * src/editfns.c (Fformat): Update documentation. (styled_format): Implement field numbers. * doc/lispref/strings.texi (Formatting Strings): Document field numbers. * lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn): Adapt. * test/src/editfns-tests.el (format-with-field): New unit test.
* Fix build errors on macOS 10.6 (bug#27059)Alan Third2017-06-011-4/+7
| | | | * src/nsfns.m (compute_tip_xy): Don't use CGRectContainsPoint.
* Add customizable to display raw bytes as hexVasilij Schneidermann2017-06-011-3/+13
| | | | | | | | | | | | | | | * src/xdisp.c (get_next_display_element): Dispatch used format string for unprintables based on new display-raw-bytes-as-hex variable. (display-raw-bytes-as-hex): New variable. (Bug#27122) * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex. * doc/emacs/display.texi: Document the new variable. * etc/NEWS: Mention display-raw-bytes-as-hex. * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle) (test-redisplay-5): New tests. (test-redisplay): Call test-redisplay-5.
* Revert "Add customizable to display raw bytes as hex"Eli Zaretskii2017-06-011-13/+3
| | | | This reverts commit 7c9ac111c5e5d92e620b666893993d5dc562e483.
* Add customizable to display raw bytes as hexEli Zaretskii2017-06-011-3/+13
| | | | | | | | | | | | | | | * src/xdisp.c (get_next_display_element): Dispatch used format string for unprintables based on new display-raw-bytes-as-hex variable. (display-raw-bytes-as-hex): New variable. (Bug#27122) * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex. * doc/emacs/display.texi: Document the new variable. * etc/NEWS: Mention display-raw-bytes-as-hex. * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle) (test-redisplay-5): New tests. (test-redisplay): Call test-redisplay-5.
* Use true names for invocation- and source-directoryGlenn Morris2017-05-312-0/+6
| | | | | * src/emacs.c (init_cmdargs) <Vinvocation_directory>: * src/lread.c (init_lread) <Vsource_directory>: Use true names.
* Fix bug with "%%" in error formatPaul Eggert2017-05-311-1/+3
| | | | | | * src/doprnt.c (doprnt): Format "%%" correctly. Problem reported by Philipp Stephani in: http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00901.html
* * src/editfns.c (Fmessage): Improve doc string (Bug#23425#130).Paul Eggert2017-05-311-5/+4
|
* Support lower bound on hscrolling when only current line scrollsEli Zaretskii2017-05-311-4/+20
| | | | | | | | | | | | | | * doc/emacs/display.texi (Horizontal Scrolling): Document the new mode of auto-hscrolling only the current line. * src/xdisp.c (init_iterator): When hscrolling only the current line, apply the window's min_hscroll here, so that non-current lines will be hscrolled by that minimum. Suggested by Stephen Berman <stephen.berman@gmx.net>. (hscroll_window_tree): Account for window's min_hscroll when deciding whether to recompute the hscroll. (display_line): Subtract window's min_hscroll from x_incr, as that was already accounted for in init_iterator. (Bug#27008)
* Avoid inflooping in redisplay due to Spacemacs and linum-modeEli Zaretskii2017-05-311-1/+10
| | | | | | * src/xdisp.c (redisplay_internal): Limit the number of redisplay retries when a frame becomes garbaged as result of redisplaying it. (Bug#27115)
* * src/editfns.c (decode-time): Fix docstring.Tino Calancha2017-05-311-1/+1
|
* Mode line "%q" construct: Just use one number when both would be the same.Alan Mackenzie2017-05-301-9/+6
| | | | * src/xdisp (decode_mode_spec): recode the "%q" bit appropriately.
* Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon'Noam Postavsky2017-05-292-10/+10
| | | | | | | | | | * doc/emacs/cmdargs.texi (Initial Options): * doc/lispref/os.texi (Startup Summary): * etc/NEWS: * etc/emacs.service: * src/emacs.c (main): * src/lisp.h: Rename '--new-daemon' to 'fg-daemon' and '--old-daemon' to '--bg-daemon'.
* Improve .gdbinit Lisp value pretty-printingPaul Eggert2017-05-291-6/+45
| | | | | | * src/.gdbinit (to_string): Use an unsigned representation for Lisp values, as requested by Eli Zaretskii (Bug#27098). Also, use "make_number(N)" for Lisp integers.
* Fix build error on macOS 10.6Alan Third2017-05-291-1/+1
| | | | | * src/nsfns.m (compute_tip_xy): Cast NSRect to CGRect and NSPoint to CGPoint.
* Depromiscuify inotify with IN_MASK_ADDPaul Eggert2017-05-271-17/+1
| | | | | | | | | Use IN_MASK_ADD instead of using a no-longer-promiscuous-enough mask. This simplifies the code and restores the ability to use IN_ACCESS, IN_CLOSE_WRITE, IN_CLOSE_NOWRITE, and IN_OPEN in some cases (Bug#26973). * src/inotify.c (INOTIFY_DEFAULT_MASK): Remove. (Finotify_add_watch): Use IN_MASK_ADD instead.
* Restore inotify onlydir supportPaul Eggert2017-05-271-8/+8
| | | | | | | | There was no need to remove it in the 2017-03-26 inotify change, as it is like IN_DONT_FOLLOW and does not affect other watchers for the same file. * src/inotify.c (symbol_to_inotifymask, Finotify_add_watch) (syms_of_inotify): Bring back onlydir.
* Simplify computation of inotify maskPaul Eggert2017-05-271-9/+6
| | | | | | | * src/inotify.c (add_watch): Accept uint32_t imask instead of Lisp_Object aspect. Caller changed. (Finotify_add_watch): Use aspect_to_inotifymask earlier, to simplify the code.
* Avoid another compiler warning on macOSPhilipp Stephani2017-05-271-1/+1
| | | | | | | | When configured with --without-ns, HAVE_NS is not defined on macOS, thus 'memory-limit' calls the deprecated sbrk(2) function. Avoid that by using the pre-defined __APPLE__ preprocessor macro. * src/alloc.c (Fmemory_limit): Never use sbrk(2) on macOS.
* Minor doc and doc-string fixes (Bug#27091)Martin Rudalics2017-05-271-7/+9
| | | | | | | | | | | * src/window.c (Fset_window_scroll_bars): Fix doc-string. * doc/lispref/display.texi (Fringe Size/Pos, Scroll Bars) (Display Margins): Mention that `set-window-buffer' may override settings made by `set-window-fringes', `set-window-scroll-bars' and `set-window-margins'. * doc/lispref/windows.texi (Buffers and Windows): Fix doc of `set-window-buffer'.
* Avoid args-out-of-range errors on fringe clicks after "C-h k"Eli Zaretskii2017-05-271-1/+2
| | | | | * src/keyboard.c (echo_truncate): Don't call Ftruncate if the echo message is already shorter than NCHARS. (Bug#27040)
* Check if instancetype supported in ObjCAlan Third2017-05-271-9/+11
| | | | | * configure.ac: Add check for instancetype. * src/nsterm.h [!NATIVE_OBJC_INSTANCETYPE]: Define instancetype.
* * src/inotify.c: Add FIXME comments.Paul Eggert2017-05-261-16/+19
|
* Fix Bug#26973Andreas Politz2017-05-261-1/+15
| | | | | | * src/inotify.c (INOTIFY_DEFAULT_MASK): Removing ACCESS, OPEN and CLOSE events on order do let other processes also reading from their descriptors. (Bug#26973).
* Fix NS tooltips showing in the wrong place (bug#27053)Alan Third2017-05-251-18/+1
| | | | | * src/nsfns.m (compute_tip_xy): Get current mouse position instead of last recorded position.
* Port ATTRIBUTE_MAY_ALIAS to recent iccPaul Eggert2017-05-251-1/+1
| | | | | | | | | * src/conf_post.h (ATTRIBUTE_MAY_ALIAS) [__ICC]: Define to empty. Otherwise, icc (ICC) 17.0.4 20170411 says “warning #2621: attribute "__may_alias__" does not apply here” for constructs like ‘struct sockaddr *sa = (whatever); struct sockaddr_in __attribute__ ((__may_alias__)) *sin = (struct sockaddr_in *) sa;’.
* Raise version of macOS we define instancetype for (bug#27059)Alan Third2017-05-241-1/+1
| | | | * src/nsterm.m: Increase supported version number.
* Define new types on macOS 10.6 (bug#27041)Alan Third2017-05-241-4/+6
| | | | | * src/nsterm.h: Enable instancetype typedef for older macOS, and use correct NSUInteger instead of int.
* * src/fns.c (sxhash): Fix records hashing (bug#27057, bug#26639)Stefan Monnier2017-05-241-4/+4
| | | | | (sxhash_vector): Make it work on pseudo vectors as well. (sxhash): Treat records like vectors.
* Fix GNUstep buildAlan Third2017-05-232-0/+12
| | | | | | | | * src/nsterm.h [NS_IMPL_GNUSTEP]: Add typedefs for Cocoa-only types. (NSWindowStyleMaskUtilityWindow): #define to NSUtilityWindowMask in GNUstep and old versions of macOS. * src/nsfns.m (ns-set-mouse-absolute-pixel-position): Function only works in cocoa, not GNUstep.
* Fix current-line hscrolling in buffers with header-lineEli Zaretskii2017-05-221-1/+3
| | | | | | * src/xdisp.c (display_line): When testing the glyph row's vertical position against the cursor position, account for header line, if any. (Bug#27014)
* Improve module function terminologyPhilipp Stephani2017-05-212-24/+20
| | | | | | | | | | | | Module functions were previously called "function environments" when the functions created by module_make_functions were lambdas. Now we can adapt the terminology and rename "function environments" to "module functions" everywhere. This also removes the name clash between "function environments" and "module environments." * src/emacs-module.c (module_make_function): Adapt comment to reality; stop using "function environment" terminology. (funcall_module): Stop using "function environment" terminology.
* Avoid uninitialized readPhilipp Stephani2017-05-211-0/+2
| | | | * src/nsterm.m (ns_read_socket): Don't read uninitialized variable 'nevents'.
* Fix call of registerServicesMenuSendTypesPhilipp Stephani2017-05-211-1/+1
| | | | | * src/nsterm.m (initFrameFromEmacs:): nil is not allowed for returnTypes; pass an empty array instead.
* Clean up code around 'ns-list-services'Philipp Stephani2017-05-211-30/+2
| | | | | | | * src/nsfns.m (Fns_list_services): Remove unreachable code. In this branch NS_IMPL_COCOA cannot be defined. (interpret_services_menu): Define only if called to avoid compiler warnings about unused static functions.
* Remove unused automatic variablesPhilipp Stephani2017-05-212-3/+1
| | | | | * nsterm.m (ns_read_socket): * macfont.m (macfont_open): Remove unused automatic variables.
* Nextstep: Replace deprecated enumeratorsPhilipp Stephani2017-05-211-1/+1
| | | | | * src/nsmenu.m (initWithContentRect:styleMask:backing:defer:): Replace deprecated enumerator.
* Nextstep: remove some deprecated method callsPhilipp Stephani2017-05-213-4/+5
| | | | | | | * src/nsterm.m (mouseDown:): * src/nsmenu.m (runMenuAt:forFrame:keymaps:): Remove call to deprecated method. The return value is always nil. * src/macfont.m (mac_font_shape_1): Replace call to deprecated method.
* Remove trailing semicolons in method definitionsPhilipp Stephani2017-05-212-4/+4
| | | | | | | | These semicolons are ignored and cause compiler warnings. * src/nsimage.m (setPixelAtX:Y:toRed:green:blue:alpha:): * src/nsterm.m (init, updateFrameSize:): (setFrame:): Remove trailing semicolon.
* Remove calls to deprecated setUsesScreenFontsPhilipp Stephani2017-05-211-5/+2
| | | | | | * src/macfont.m (mac_screen_font_get_metrics): Don't call setUsesScreenFonts. (mac_font_shape_1): Remove screen_font_p parameter. (mac_screen_font_shape): Remove screen_font_p argument.
* Make a function static that isn't used outside this filePhilipp Stephani2017-05-211-1/+1
| | | | * src/kqueue.c (kqueue_directory_listing): Make static.
* Use NSCharacterCollection instead of CTCharacterCollectionPhilipp Stephani2017-05-211-13/+13
| | | | | | | | | This should not cause behavior changes, but fixes a compiler warning due to implicit conversions between the enums. * src/macfont.m (macfont_cache, macfont_lookup_cache) (macfont_get_glyph_for_cid, macfont_get_uvs_table) (macfont_variation_glyphs): Use NSCharacterCollection.
* Remove unused function print_regionsPhilipp Stephani2017-05-211-25/+0
|
* Declare Nextstep unexec functions in lisp.hPhilipp Stephani2017-05-212-4/+8
| | | | This removes compiler warnings about missing prototypes on macOS.
* Nextstep: Use instancetype explicit return typePhilipp Stephani2017-05-214-39/+39
| | | | | | | | | | | | | | | | | | | | | | | This removes compiler warnings on macOS and improves type safety. * nsterm.m (initFrameFromEmacs:): (menuDown:): (toolbarClicked:): (toggleToolbar:): (setMiniwindowImage:): (initFrame:window:): (condemn, reprieve, setPosition:portion:whole:): (repeatScroll:): * nsmenu.m (initWithTitle:): (initWithTitle:frame:): (initForView:withIdentifier:): (init, initWithContentRect:styleMask:backing:defer:): (initFromContents:isQuestion:): * nsimage.m (allocInitFromFile:): (initFromXBM:width:height:fg:bg:): (setXBMColor:): (initForXPMWithDepth:width:height:): Use instancetype as return type instead of implicit id.
* Enhance mode-line percentage offset facility, with "%o" and "%q"Alan Mackenzie2017-05-211-0/+48
| | | | | | | | | | | | | | | | | | "%o" will display the percentage "travel" of the window through the buffer. "%q" will display a combination of the percentage offsets of the top and bottom of the window. The new user option mode-line-percent-position will facilitate selecting a setting for this part of the mode line. * lisp/bindings.el (mode-line-percent-position): New customizable user option. (mode-line-position): Use mode-line-percent-position in place of "%p", etc. * src/xdisp.c (decode_mode_spec): Add handlers for "%o" and "%q". * doc/lispref/modes.texi (Mode Line Variables): Document mode-line-percent-position. (%-Constructs): Document %o and %q. * etc/NEWS: Add an entry for these new facilities.
* Work around macOS bug in create_process, tooPaul Eggert2017-05-211-2/+7
| | | | | * src/process.c (create_process) [DARWIN_OS]: Reset SIGCHLD after vfork here, too.
* Work around macOS bug with vforked childPaul Eggert2017-05-211-0/+8
| | | | | * src/callproc.c (call_process) [DARWIN_OS]: Include workaround for apparent macOS bug.
* Pacify --enable-gcc-warnings without modulesPaul Eggert2017-05-211-384/+367
| | | | | | | | | * src/print.c (print_vectorlike): New function, taken from part of print_object. This one is indented properly, and pacifies --enable-gcc-warnings by using a default case instead of listing all the enum values, sometimes incompletely. (print_object): Use it.
* Remove DARWIN_OS_CASE_SENSITIVE_FIXME codePaul Eggert2017-05-201-21/+0
| | | | | | | It does not appear to be needed (Bug#24441). * etc/PROBLEMS: Remove DARWIN_OS_CASE_SENSITIVE_FIXME stuff. * src/fileio.c (file_name_case_insensitive_p): Remove DARWIN_OS_CASE_SENSITIVE_FIXME code.